Is strapi uuid automatically generated? - strapi

I'm checking the dependencies of this Strapi Project with Next and as I'm setting up the backend directory, I review the dependencies and see:
`
"strapi": {
"uuid": "c35cad70-92f3-4df5-9408-xxxxxxxxxxxx"
},
`
Just curious whether I should update this or not according to what my professor's backend directory.
I'm stuck in a dependency bug and just trying to edit each dependency that's deprecated in the package.json

Related

Reuse package.json version within file

I have a project which uses dependency having having version same as that of the project. So I would like to change the version only in one place and write something like below this in my package.json
{
"name": "my-child-app",
"version": "1.2.3",
"description": "My Application",
"dependencies": {
"my-parent-app": %npm_package_version%
}
}
Basically the child app is always supposed to have version in sync with the parent app. So any approach where I will have to change only one line (instead of two in usual scenario) when I have to upgrade to a newer parent-app would suffice.
Note: I am using frontend-maven-plugin to build the project as child-app is a module of Java Project. parent-app is also built in a same way but they are not in the same code repository so file referencing cannot be used.

Submit a plugin to Octobercms Market with composer requirements; must the vendor map be included?

As an developer I want to submit a plugin to the OC Market. My plugin has composer requirements defined in composer.json.
On dev machine everything works well, the dependencies are included with composer update executed in the root of the project. So all dependencies are in the main root vendor map.
I already have submitted my plugin to the OC Market, from within the account/plugin/create page. The plugin was uploaded as ZIP file without(!) vendor map. The dependencies were only defined in a composer.json file, but not actually included in the ZIP file.
When I now install my plugin in a fresh OC install, a 'vendor' map is included in the plugin folder. Like this: 'plugins/author/foo/vendor'. The plugin is installed from within the CMS (url: backend/system/updates/install), and also as a second test on cli with $ artisan plugin:install author.foo. Both times the installation went correct.
How is this vendor map got in the folder where the plugin reside?
Is it good practice to add or not add a vendor map in the ZIP file on submitting to OC Market?
The octobercms.com marketplace build process pulls in the plugin’s dependencies into a vendor directory under the plugin’s own directory and then removes composer.lock and composer.json from the package that gets generated. This is to support users that don’t use composer while also supporting users that use both marketplace plugins and composer-based plugins.
If we left the composer.json in the plugin during the build process and then the user were to run composer update from the project root on that marketplace plugin, suddenly they would have duplicated dependencies which was causing a lot of issues.
All of this to say: Don't include your vendor directory when submitting a plugin to the marketplace, the marketplace will take care of that. Do include your composer.json file though.
In regards to RainLab.GoogleAnalytics, the build on the marketplace appears to be broken which means that it needs to be rebuilt on the marketplace. This could be triggered by pushing an update to the Github repository, unfortunately for some reason that repository is massively broken for my Github account and I don't even have the ability to comment on issues. Thus, I'm unable to trigger a rebuild of the plugin. However, if you remind me on Slack or IRC to talk to #spunky (creator of October) about it then I can do that and perhaps he can trigger a rebuild.
October fetchs the composer depencies on plugin install or php artisan october:up
For example in my plugin:
{
"name" : "Tschallacka/dynamic-pages-plugin",
"type" : "october-plugin",
"description" : "DynamicPages plugin for October CMS",
"homepage" : "",
"keywords" : [
"october",
"octobercms",
"pages",
"exit"
],
"authors" : [{
"name" : "Tschallacka",
"email" : "tsch#",
"role" : "Developer"
}
],
"require" : {
"php" : ">=7.0",
"composer/installers" : "~1.0",
"webpatser/laravel-uuid" : "^2.0",
"paragonie/random_compat" : "^2.0"
},
"minimum-stability" : "dev"
}
If I supply it without the vendor folder, then when I do october:up or install it via october backend, the vendor folder (residing here plugins/author/myplugin/vendor) will be populated with the required files, so I end up with the composer, webpatser and paragonie folders in my vendor dir.

Set specific commit of a dependency with govendor

I'm using govendor for managing dependencies in a project. I have the following dependency in my vendor/vendor.json.
{
...
"package": [
{...},
{
"checksumSHA1": "8XAGmXqf+b4LW91wsWxa4kH1NN0=",
"path": "gopkg.in/h2non/bimg.v1",
"revision": "9bb3ae10c5ce30e72f7ac0834368536fc095d6a7",
"revisionTime": "2017-01-13T19:35:42Z"
}
],
...
}
Now I want to use master version of bimg package, which is newer than version 1.0.7 fetched by govendor. What is a proper way to achieve this, beside manually downloading master version from github and saving it to the vendor folder?
ps: all dependencies are committed.
I got help from #jbrandhorst in go slack:
you'll want to remove the old one as well, govendor remove gopkg.in/h2non/bimg.v1
[3:16] source repo appears to be github.com/h2non/bimg, so
govendor fetch github.com/h2non/bimg will install it to your vendor
folder
[3:16] if you just want to add it to your vendor.json, you use
govendor add I think

Cannot find module after creating and adding plugin in Nativescript

Using the latest version of Nativescript I've created a plugin as per the documentation and after running tns plugin add ../nativescript-keychain I get the message Successfully installed plugin nativescript-keychain.
I can also see that it's been added to the node_modules directory of my app but require("nativescript-keychain") doesn't work as I get the error Cannot find module 'nativescript-keychain'
My plugin package.json looks like
{
"name": "nativescript-keychain",
"version": "0.0.1",
"nativescript": {
"platforms": {
"ios": "2.2.1"
}
}
}
There are several reasons why this might occur; it would be helpful if you provided a repo to see all the code.
package.json doesn't have a link to the source, typically you have a main: "somefile" key.
Did you do tns run ios --emulator after you installed the plugin, you have to rebuild the app before it will take effect, plugins can't be synced via livesync...
Is the code TypeScript or JavaScript, if it is TypeScript it needs to be transpiled to JS before you can add it to your demo application. TNS will NOT compile any TS code in the plugins. Plugins have to ship with the final JS code.
You need typings for TS to use the auto-complete and not throw warnings about what methods are available.

How to use composer with a non-packagist github project containing a packages.json

I want to put https://github.com/timrwood/moment into my composer.json for easy maintenance.
It's not an official packagist project (of course, as it's not PHP), but it contains a packages.json for nodejs. Can I use this in my composer.json?
I tried this, but it didn't work:
{
"repositories": {
"timrwood/moment": {
"type": "git",
"url": "git://github.com/timrwood/moment.git"
}
}
}
It throws an error message saying "No valid composer.json was found in any branch or tag of git://github.com/timrwood/moment.git, could not load a package from it."
And it is lacking the version string to define the version I want to use...
Can anyone help here?
Or shouldn't I use composer here at all cause I'm mixing JS and PHP?
Composer only manages composer packages. It does not know how to parse a package.json file. There are different approaches to this problem. Composer may be able to deal with frontend dependencies in the future.
For the time being I'd recommend using a separate dependency manager for your JavaScript dependencies. Either NPM or something like jam or ender.
Check out composer plugin to handle components via bower, nodejs and git repositories: fxpio/composer-asset-plugin.

Resources