lucid-package 0.0.26 → 0.0.28
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/package.json +1 -1
- package/src/editorextension.js +6 -1
- package/src/index.js +6 -1
package/package.json
CHANGED
package/src/editorextension.js
CHANGED
|
@@ -9,6 +9,7 @@ const express = require("express");
|
|
|
9
9
|
const child_process = require("child_process");
|
|
10
10
|
const shapelibrary_1 = require("./shapelibrary");
|
|
11
11
|
const packagemanifest_1 = require("./packagemanifest");
|
|
12
|
+
const path = require("path");
|
|
12
13
|
const WebPackCLI = require('webpack-cli');
|
|
13
14
|
function linkInternalTestingSDK() {
|
|
14
15
|
if (!oldFs.existsSync('node_modules/lucid-extension-sdk')) {
|
|
@@ -16,8 +17,9 @@ function linkInternalTestingSDK() {
|
|
|
16
17
|
const rootSearch = 'lucid/main/extensibility/';
|
|
17
18
|
const pos = cwd.indexOf(rootSearch);
|
|
18
19
|
const sdkPath = cwd.substr(0, pos + rootSearch.length) + 'lucid-extension-sdk';
|
|
20
|
+
const relativePath = path.relative(cwd, sdkPath);
|
|
19
21
|
console.log('Using symlink for dependency on SDK for internal testing');
|
|
20
|
-
console.log(child_process.execSync(`
|
|
22
|
+
console.log(child_process.execSync(`npm install --silent --save ${relativePath}`).toString());
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
function installDependenciesIfNeeded(isInternalTesting) {
|
|
@@ -138,6 +140,9 @@ async function debugEditorExtension(extensionNames, quiet = false) {
|
|
|
138
140
|
const credentials = JSON.parse((await fs.readFile(`${name}.credentials.local`)).toString());
|
|
139
141
|
res.send(JSON.stringify(Object.assign(Object.assign({}, provider), credentials)));
|
|
140
142
|
}
|
|
143
|
+
else {
|
|
144
|
+
res.sendStatus(404);
|
|
145
|
+
}
|
|
141
146
|
}
|
|
142
147
|
else {
|
|
143
148
|
res.sendStatus(404);
|
package/src/index.js
CHANGED
|
@@ -72,7 +72,7 @@ class LucidSuiteExtensionCLI {
|
|
|
72
72
|
createShapeLibrary.add_argument('name');
|
|
73
73
|
const parsed = parser.parse_args(args);
|
|
74
74
|
//For internal development, creating and operating on a "test" package via bazel
|
|
75
|
-
|
|
75
|
+
let isInternalTesting = !!parsed['chdir'];
|
|
76
76
|
if (isInternalTesting) {
|
|
77
77
|
if (parsed['project']) {
|
|
78
78
|
process.chdir(parsed['chdir'] + '/' + parsed['project']);
|
|
@@ -84,6 +84,11 @@ class LucidSuiteExtensionCLI {
|
|
|
84
84
|
else if (parsed['project']) {
|
|
85
85
|
process.chdir(parsed['project']);
|
|
86
86
|
}
|
|
87
|
+
//If we've spawned a child process recursively calling a new lucid-package target,
|
|
88
|
+
//then we're still testing as long as it's originally triggered by Bazel.
|
|
89
|
+
if (process.env['BAZEL_TARGET']) {
|
|
90
|
+
isInternalTesting = true;
|
|
91
|
+
}
|
|
87
92
|
switch (parsed['command']) {
|
|
88
93
|
case 'create':
|
|
89
94
|
(0, package_1.createEmptyPackage)(parsed['name']);
|