@steedos/service-package-registry 2.6.2-beta.9 → 2.6.3
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/main/default/manager/loader.js +1 -1
- package/main/default/manager/login.js +4 -2
- package/main/default/manager/packages.js +1 -1
- package/main/default/manager/registry.js +3 -4
- package/main/default/pages/steedos_packages_list.page.amis.json +1 -1
- package/package.json +7 -7
- package/package.service.js +5 -3
|
@@ -5,7 +5,7 @@ const fs = require("fs");
|
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const objectql = require('@steedos/objectql');
|
|
7
7
|
const registry = require('./registry');
|
|
8
|
-
const userDir =
|
|
8
|
+
const userDir = registry.settings.userDir;
|
|
9
9
|
const packagesFilePath = path.join(userDir, 'steedos-packages.yml');
|
|
10
10
|
const metadataApi = require('@steedos/metadata-api');
|
|
11
11
|
const util = require('./util');
|
|
@@ -2,8 +2,10 @@ var ncl = require('./npm_login.js');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
var fs = require('fs');
|
|
4
4
|
const _ = require('lodash');
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const registry = require('./registry');
|
|
6
|
+
const userDir = registry.settings.userDir;
|
|
7
|
+
const configPath = path.join(userDir, '.npmrc');
|
|
8
|
+
const yarnrcConfigPath = path.join(userDir, '.yarnrc');
|
|
7
9
|
const timeout = 10 * 1000;
|
|
8
10
|
const NPM_TOKENS = {};
|
|
9
11
|
const npmLogin = async function (user, pass, email, registry, scope, quotes, configPath) {
|
|
@@ -101,7 +101,7 @@ const getAllPackages = async ()=>{
|
|
|
101
101
|
return packages;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const userDir =
|
|
104
|
+
const userDir = registry.settings.userDir;
|
|
105
105
|
const maintainSystemFiles = ()=>{
|
|
106
106
|
if(!fs.existsSync(userDir)){
|
|
107
107
|
fs.mkdirSync(userDir);
|
|
@@ -19,9 +19,7 @@ const npa = require("npm-package-arg");
|
|
|
19
19
|
|
|
20
20
|
log.init({});
|
|
21
21
|
|
|
22
|
-
const settings =
|
|
23
|
-
userDir: path.join(process.cwd(), '.steedos')
|
|
24
|
-
}
|
|
22
|
+
const settings = require('../../../package.service').settings
|
|
25
23
|
|
|
26
24
|
function checkModulePath(folder) {
|
|
27
25
|
var moduleName;
|
|
@@ -352,5 +350,6 @@ module.exports = {
|
|
|
352
350
|
installModule,
|
|
353
351
|
uninstallModule,
|
|
354
352
|
isPackageUrl,
|
|
355
|
-
yarnAddPackage
|
|
353
|
+
yarnAddPackage,
|
|
354
|
+
settings
|
|
356
355
|
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"id": "u:2bb7748ac402"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"adaptor": "if (payload.data.rows.length) {\n var unpkgUrl = window.Builder && window.Builder.settings.unpkgUrl || \"\";\n payload.data.rows.forEach(function (row) {\n if (!row.icon) {\n row.icon = \"standard.default\";\n }\n if (row.icon) {\n if (!/^http(s?):\\/\\//.test(row.icon) && !row.icon.endsWith('.jpg') && !row.icon.endsWith('.png')) {\n var iconCategory = \"standard\";\n var iconName = row.icon;\n var tags = row.icon.split(\".\");\n if (tags.length > 1) {\n iconCategory = tags[0];\n iconName = tags[1];\n }\n row.iconCategory = iconCategory;\n row.iconName = iconName.replace(\"_\", \"-\");\n row.icon = unpkgUrl + \"/@salesforce-ux/design-system@2.22.
|
|
70
|
+
"adaptor": "if (payload.data.rows.length) {\n var unpkgUrl = window.Builder && window.Builder.settings.unpkgUrl || \"\";\n payload.data.rows.forEach(function (row) {\n if (!row.icon) {\n row.icon = \"standard.default\";\n }\n if (row.icon) {\n if (!/^http(s?):\\/\\//.test(row.icon) && !row.icon.endsWith('.jpg') && !row.icon.endsWith('.png')) {\n var iconCategory = \"standard\";\n var iconName = row.icon;\n var tags = row.icon.split(\".\");\n if (tags.length > 1) {\n iconCategory = tags[0];\n iconName = tags[1];\n }\n row.iconCategory = iconCategory;\n row.iconName = iconName.replace(\"_\", \"-\");\n row.icon = unpkgUrl + \"/@salesforce-ux/design-system@2.22.2/assets/icons/\" + iconCategory + \"/\" + iconName.replace(\"-\", \"_\") + \"_120.png\";\n }\n }\n });\n}\nreturn payload;"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
73
|
"regions": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-package-registry",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "package.service.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"author": "",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@steedos/auth": "2.6.
|
|
13
|
-
"@steedos/core": "2.6.
|
|
14
|
-
"@steedos/metadata-core": "2.6.
|
|
15
|
-
"@steedos/objectql": "2.6.
|
|
16
|
-
"@steedos/service-package-loader": "2.6.
|
|
12
|
+
"@steedos/auth": "2.6.3",
|
|
13
|
+
"@steedos/core": "2.6.3",
|
|
14
|
+
"@steedos/metadata-core": "2.6.3",
|
|
15
|
+
"@steedos/objectql": "2.6.3",
|
|
16
|
+
"@steedos/service-package-loader": "2.6.3",
|
|
17
17
|
"fs-extra": "8.1.0",
|
|
18
18
|
"i18next": "20.3.2",
|
|
19
19
|
"json-stringify-safe": "5.0.1",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "2b56101256aa6fa0069d86bd373e4e368bd7d073"
|
|
35
35
|
}
|
package/package.service.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: baozhoutao@steedos.com
|
|
3
3
|
* @Date: 2022-07-16 15:58:42
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 孙浩林 sunhaolin@steedos.com
|
|
5
|
+
* @LastEditTime: 2024-01-08 15:36:18
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
"use strict";
|
|
9
9
|
const project = require('./package.json');
|
|
10
10
|
const packageName = project.name;
|
|
11
11
|
const packageLoader = require('@steedos/service-package-loader');
|
|
12
|
+
const path = require('path');
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @typedef {import('moleculer').Context} Context Moleculer's Context
|
|
@@ -26,7 +27,8 @@ module.exports = {
|
|
|
26
27
|
path: __dirname,
|
|
27
28
|
name: this.name,
|
|
28
29
|
isPackage: false
|
|
29
|
-
}
|
|
30
|
+
},
|
|
31
|
+
userDir: process.env.STEEDOS_PACKAGE_STORAGE || path.join(process.cwd(), '.steedos'),
|
|
30
32
|
},
|
|
31
33
|
|
|
32
34
|
/**
|