@dotpi/tools 2.11.3 → 2.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dotpi_root/dist/@dotpi/module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module/package.json +3 -2
- package/dotpi_root/dist/@dotpi/module/src/install.js +3 -2
- package/dotpi_root/dist/@dotpi/module/src/uninstall.js +5 -3
- package/dotpi_root/dist/@dotpi/module-module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module-module/package.json +4 -3
- package/package.json +3 -3
- package/src/constants.js +1 -0
- package/src/create-project.js +5 -0
- package/src/templates/package.json +5 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
6
|
+
are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above copyright notice, this
|
|
12
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
13
|
+
other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of the IRCAM nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
20
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
21
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
23
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
24
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
25
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
26
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
28
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotpi/module",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "dotpi module management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -11,5 +11,6 @@
|
|
|
11
11
|
"@dotpi/javascript": "^1.6.3",
|
|
12
12
|
"execa": "^9.5.2",
|
|
13
13
|
"globby": "^14.0.2"
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "9356e1fd0c1c5f76a16243e2ac40c0951af64779"
|
|
15
16
|
}
|
|
@@ -80,8 +80,8 @@ export async function install(modules = [], {
|
|
|
80
80
|
let output;
|
|
81
81
|
let cwd;
|
|
82
82
|
|
|
83
|
-
if(verbose
|
|
84
|
-
|
|
83
|
+
if(verbose !== 'none') {
|
|
84
|
+
echo.info(`Installing module '${moduleToInstall}' in '${dotpiModulesDestination}'`);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// create link first, it may be used in postinstall scripts
|
|
@@ -101,6 +101,7 @@ export async function install(modules = [], {
|
|
|
101
101
|
// full install with postinstall scripts for each request
|
|
102
102
|
})`
|
|
103
103
|
npx pnpm install
|
|
104
|
+
--prod
|
|
104
105
|
--dangerously-allow-all-builds
|
|
105
106
|
--
|
|
106
107
|
${moduleToInstall}
|
|
@@ -69,17 +69,20 @@ export async function uninstall(modules = [], {
|
|
|
69
69
|
switch (verbose) {
|
|
70
70
|
case '0':
|
|
71
71
|
case 'false':
|
|
72
|
+
case 'none':
|
|
72
73
|
case false:
|
|
73
74
|
verbose = 'none';
|
|
74
75
|
break;
|
|
75
76
|
|
|
76
77
|
case '1':
|
|
77
78
|
case 'true':
|
|
79
|
+
case 'sort':
|
|
78
80
|
case true:
|
|
79
81
|
verbose = 'short';
|
|
80
82
|
break;
|
|
81
83
|
|
|
82
84
|
case '2':
|
|
85
|
+
case 'full':
|
|
83
86
|
verbose = 'full';
|
|
84
87
|
break;
|
|
85
88
|
}
|
|
@@ -158,9 +161,8 @@ export async function uninstall(modules = [], {
|
|
|
158
161
|
env: { FORCE_COLOR: 'true' }, // do not remove colors
|
|
159
162
|
verbose: (verbose === 'full' ? 'full' : 'none'),
|
|
160
163
|
})`
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
--save
|
|
164
|
+
npx pnpm
|
|
165
|
+
remove
|
|
164
166
|
--
|
|
165
167
|
${moduleName}
|
|
166
168
|
`;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
6
|
+
are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above copyright notice, this
|
|
12
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
13
|
+
other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of the IRCAM nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
20
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
21
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
23
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
24
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
25
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
26
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
28
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotpi/module-module",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "dotpi module management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./bin/dotpi_module",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"license": "BSD-3-clause",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@dotpi/javascript": "^1.6.3",
|
|
14
|
-
"@dotpi/module": "^1.10.
|
|
14
|
+
"@dotpi/module": "^1.10.1",
|
|
15
15
|
"commander": "^12.1.0"
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"gitHead": "9356e1fd0c1c5f76a16243e2ac40c0951af64779"
|
|
17
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotpi/tools",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.4",
|
|
4
4
|
"description": "Set of scripts for managing dotpi fleets of Raspberry Pi",
|
|
5
5
|
"author": "Jean-Philippe Lambert",
|
|
6
6
|
"contributors": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"license": "BSD-3-Clause",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@dotpi/javascript": "^1.6.3",
|
|
40
|
-
"@dotpi/module": "^1.10.
|
|
40
|
+
"@dotpi/module": "^1.10.1",
|
|
41
41
|
"chalk": "^5.3.0",
|
|
42
42
|
"commander": "^12.1.0",
|
|
43
43
|
"prompts": "^2.4.2",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"lerna": "^8.2.4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "9356e1fd0c1c5f76a16243e2ac40c0951af64779"
|
|
50
50
|
}
|
package/src/constants.js
CHANGED
|
@@ -21,6 +21,7 @@ export const PATH_NETWORK_DIRECTORY = 'network';
|
|
|
21
21
|
export const PATH_GITIGNORE = '.gitignore';
|
|
22
22
|
export const PATH_README = 'README.md';
|
|
23
23
|
export const PATH_DOTPI_FILE = '.dotpi';
|
|
24
|
+
export const PATH_PACKAGE_JSON = 'package.json';
|
|
24
25
|
// these ones are within a project, e.g. where the next instance number is stored
|
|
25
26
|
export const PATH_DOTPI_TMP_DIRECTORY = 'tmp';
|
|
26
27
|
export const PATH_DOTPI_TMP_BASH = path.join(PATH_DOTPI_TMP_DIRECTORY, 'dotpi_tmp.bash');
|
package/src/create-project.js
CHANGED
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
PATH_GITIGNORE,
|
|
35
35
|
PATH_README,
|
|
36
36
|
PATH_DOTPI_FILE,
|
|
37
|
+
PATH_PACKAGE_JSON,
|
|
37
38
|
// utilities
|
|
38
39
|
DOTPI_SSH_KEYS_PREFIX,
|
|
39
40
|
PROJECT_NAME_REGEXP,
|
|
@@ -435,6 +436,10 @@ export async function injectUtilityFiles(data) {
|
|
|
435
436
|
PATH_SSH_DIRECTORY,
|
|
436
437
|
PATH_NETWORK_DIRECTORY,
|
|
437
438
|
});
|
|
439
|
+
|
|
440
|
+
data.files[PATH_PACKAGE_JSON] = renderTemplate('package.json', {
|
|
441
|
+
projectName,
|
|
442
|
+
});
|
|
438
443
|
}
|
|
439
444
|
|
|
440
445
|
export async function persistProject(data, mocks = null) {
|