@ms-cloudpack/cli 0.1.0 → 0.2.0
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/CHANGELOG.json +76 -1
- package/CHANGELOG.md +31 -2
- package/lib/commands/start/start.js +5 -4
- package/lib/commands/start/start.js.map +1 -1
- package/lib/commands/start/startAppServer.d.ts +2 -1
- package/lib/commands/start/startAppServer.js +22 -2
- package/lib/commands/start/startAppServer.js.map +1 -1
- package/lib/commands/start/startBundleServer.js +39 -26
- package/lib/commands/start/startBundleServer.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,82 @@
|
|
|
2
2
|
"name": "@ms-cloudpack/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 25 May 2022 21:40:21 GMT",
|
|
6
|
+
"tag": "@ms-cloudpack/cli_v0.2.0",
|
|
7
|
+
"version": "0.2.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "dzearing@microsoft.com",
|
|
12
|
+
"package": "@ms-cloudpack/cli",
|
|
13
|
+
"commit": "c81fea1af8bedcd81366fbddb199dd2c0e6cbaa7",
|
|
14
|
+
"comment": "Updating the page to emit the right script url."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@ms-cloudpack/cli",
|
|
19
|
+
"comment": "Bump @ms-cloudpack/bundler to v0.1.3",
|
|
20
|
+
"commit": "c81fea1af8bedcd81366fbddb199dd2c0e6cbaa7"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@ms-cloudpack/cli",
|
|
25
|
+
"comment": "Bump @ms-cloudpack/package-utilities to v0.4.0",
|
|
26
|
+
"commit": "c81fea1af8bedcd81366fbddb199dd2c0e6cbaa7"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@ms-cloudpack/cli",
|
|
31
|
+
"comment": "Bump @ms-cloudpack/path-utilities to v0.3.0",
|
|
32
|
+
"commit": "c81fea1af8bedcd81366fbddb199dd2c0e6cbaa7"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Mon, 23 May 2022 23:22:13 GMT",
|
|
39
|
+
"tag": "@ms-cloudpack/cli_v0.1.2",
|
|
40
|
+
"version": "0.1.2",
|
|
41
|
+
"comments": {
|
|
42
|
+
"patch": [
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@ms-cloudpack/cli",
|
|
46
|
+
"comment": "Bump @ms-cloudpack/bundler to v0.1.2",
|
|
47
|
+
"commit": "13e46036a001233485b4950f80eaee2d62f5458b"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"date": "Sat, 21 May 2022 00:31:32 GMT",
|
|
54
|
+
"tag": "@ms-cloudpack/cli_v0.1.1",
|
|
55
|
+
"version": "0.1.1",
|
|
56
|
+
"comments": {
|
|
57
|
+
"patch": [
|
|
58
|
+
{
|
|
59
|
+
"author": "dzearing@microsoft.com",
|
|
60
|
+
"package": "@ms-cloudpack/cli",
|
|
61
|
+
"commit": "c26c7bcc7abda501d07180598e3da003b435b03b",
|
|
62
|
+
"comment": "Adding call to burn import map on the page and placeholder html rendering logic."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "beachball",
|
|
66
|
+
"package": "@ms-cloudpack/cli",
|
|
67
|
+
"comment": "Bump @ms-cloudpack/bundler to v0.1.1",
|
|
68
|
+
"commit": "c26c7bcc7abda501d07180598e3da003b435b03b"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"author": "beachball",
|
|
72
|
+
"package": "@ms-cloudpack/cli",
|
|
73
|
+
"comment": "Bump @ms-cloudpack/package-utilities to v0.3.0",
|
|
74
|
+
"commit": "c26c7bcc7abda501d07180598e3da003b435b03b"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"date": "Fri, 20 May 2022 04:26:15 GMT",
|
|
6
81
|
"tag": "@ms-cloudpack/cli_v0.1.0",
|
|
7
82
|
"version": "0.1.0",
|
|
8
83
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
# Change Log - @ms-cloudpack/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 25 May 2022 21:40:21 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.2.0
|
|
8
|
+
|
|
9
|
+
Wed, 25 May 2022 21:40:21 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Updating the page to emit the right script url. (dzearing@microsoft.com)
|
|
14
|
+
- Bump @ms-cloudpack/bundler to v0.1.3
|
|
15
|
+
- Bump @ms-cloudpack/package-utilities to v0.4.0
|
|
16
|
+
- Bump @ms-cloudpack/path-utilities to v0.3.0
|
|
17
|
+
|
|
18
|
+
## 0.1.2
|
|
19
|
+
|
|
20
|
+
Mon, 23 May 2022 23:22:13 GMT
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- Bump @ms-cloudpack/bundler to v0.1.2
|
|
25
|
+
|
|
26
|
+
## 0.1.1
|
|
27
|
+
|
|
28
|
+
Sat, 21 May 2022 00:31:32 GMT
|
|
29
|
+
|
|
30
|
+
### Patches
|
|
31
|
+
|
|
32
|
+
- Adding call to burn import map on the page and placeholder html rendering logic. (dzearing@microsoft.com)
|
|
33
|
+
- Bump @ms-cloudpack/bundler to v0.1.1
|
|
34
|
+
- Bump @ms-cloudpack/package-utilities to v0.3.0
|
|
35
|
+
|
|
7
36
|
## 0.1.0
|
|
8
37
|
|
|
9
|
-
Fri, 20 May 2022 04:
|
|
38
|
+
Fri, 20 May 2022 04:26:15 GMT
|
|
10
39
|
|
|
11
40
|
### Minor changes
|
|
12
41
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createSession } from './createSession.js';
|
|
2
2
|
import { startBundleServer } from './startBundleServer.js';
|
|
3
|
+
import { startAppServer } from './startAppServer.js';
|
|
4
|
+
import { openBrowser } from './openBrowser.js';
|
|
3
5
|
/**
|
|
4
6
|
* Defines the "start" verb entry point.
|
|
5
7
|
*/
|
|
@@ -8,15 +10,14 @@ export async function start() {
|
|
|
8
10
|
// Initialize session definition.
|
|
9
11
|
const session = await createSession({ appPath });
|
|
10
12
|
const bundleServer = await startBundleServer(session);
|
|
11
|
-
|
|
12
|
-
// const [bundleServer, appServer] = await Promise.all([startBundleServer(session), startAppServer()]);
|
|
13
|
+
const appServer = await startAppServer(session, `http://localhost:${bundleServer.port}`);
|
|
13
14
|
// Close things on completion.
|
|
14
15
|
process.on('SIGINT', async function () {
|
|
15
16
|
bundleServer.close();
|
|
16
|
-
|
|
17
|
+
appServer.close();
|
|
17
18
|
process.exit(0);
|
|
18
19
|
});
|
|
19
20
|
// TODO: Uncomment when app server is added back. Open the browser.
|
|
20
|
-
|
|
21
|
+
openBrowser(`http://localhost:${appServer.port}`);
|
|
21
22
|
}
|
|
22
23
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/commands/start/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/commands/start/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK;IACzB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE9B,iCAAiC;IACjC,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,oBAAoB,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;IAEzF,8BAA8B;IAC9B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK;QACxB,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,SAAS,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,mEAAmE;IACnE,WAAW,CAAC,oBAAoB,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { Session } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* The app server hosts the appropriate routes for the web app, primarily returning html content
|
|
4
5
|
* which loads resources from the bundle server.
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
* can support whichever routes the app needs, while the bundle server can provide package
|
|
8
9
|
* assets in various forms using its own routing.
|
|
9
10
|
*/
|
|
10
|
-
export declare function startAppServer(): Promise<{
|
|
11
|
+
export declare function startAppServer(session: Session, bundleServerUrl: string): Promise<{
|
|
11
12
|
close: () => import("http").Server;
|
|
12
13
|
port: number;
|
|
13
14
|
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// import type { Session } from './types.js';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { slash } from '@ms-cloudpack/path-utilities';
|
|
4
|
+
import { createImportMap, getPackageDefinition } from '@ms-cloudpack/package-utilities';
|
|
4
5
|
import { createExpressApp } from '@ms-cloudpack/create-express-app';
|
|
5
6
|
/**
|
|
6
7
|
* The app server hosts the appropriate routes for the web app, primarily returning html content
|
|
@@ -10,14 +11,33 @@ import { createExpressApp } from '@ms-cloudpack/create-express-app';
|
|
|
10
11
|
* can support whichever routes the app needs, while the bundle server can provide package
|
|
11
12
|
* assets in various forms using its own routing.
|
|
12
13
|
*/
|
|
13
|
-
export async function startAppServer() {
|
|
14
|
+
export async function startAppServer(session, bundleServerUrl) {
|
|
15
|
+
const importMap = await createImportMap(session.resolveMap, bundleServerUrl);
|
|
16
|
+
const definition = await getPackageDefinition(session.appPath, true);
|
|
14
17
|
const { server, port } = await createExpressApp([5000, 5001, 5002, 5003], (app) => {
|
|
15
18
|
// Set up the express app routes.
|
|
16
19
|
app.get('*', async (req, res) => {
|
|
20
|
+
if (!definition) {
|
|
21
|
+
res.status(500).send(`There was no package.json located at "${session.appPath}".`);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
17
24
|
const requestPath = slash(req.path.substring(1));
|
|
18
25
|
const requestExt = path.extname(requestPath);
|
|
26
|
+
// TODO: this should derive which scripts load for each route. getEntryScript(requestPath);
|
|
27
|
+
const entryScript = `${bundleServerUrl}/${definition.name}@${definition.version}/lib/index.js`;
|
|
19
28
|
console.log(`App server: Request: ${requestPath}, ext: ${requestExt}, ${port}`);
|
|
20
|
-
res.
|
|
29
|
+
res.cookie('cloudpack-session-id', session.id);
|
|
30
|
+
res.set('Content-Security-Policy', `connect-src 'self' ws:;`);
|
|
31
|
+
res.send(`
|
|
32
|
+
<html>
|
|
33
|
+
<head>
|
|
34
|
+
<script type="importmap">${JSON.stringify(importMap, null, 2)}</script>
|
|
35
|
+
</head>
|
|
36
|
+
<body>
|
|
37
|
+
<script type="module" src="${entryScript}"></script>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
40
|
+
`);
|
|
21
41
|
});
|
|
22
42
|
});
|
|
23
43
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startAppServer.js","sourceRoot":"","sources":["../../../src/commands/start/startAppServer.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"startAppServer.js","sourceRoot":"","sources":["../../../src/commands/start/startAppServer.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAgB,EAAE,eAAuB;IAC5E,MAAM,SAAS,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAErE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,gBAAgB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE;QAChF,iCAAiC;QACjC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YAC9B,IAAI,CAAC,UAAU,EAAE;gBACf,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,yCAAyC,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;gBACnF,OAAO;aACR;YAED,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAE7C,2FAA2F;YAC3F,MAAM,WAAW,GAAG,GAAG,eAAe,IAAI,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,OAAO,eAAe,CAAC;YAE/F,OAAO,CAAC,GAAG,CAAC,wBAAwB,WAAW,UAAU,UAAU,KAAK,IAAI,EAAE,CAAC,CAAC;YAEhF,GAAG,CAAC,MAAM,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;YAC/C,GAAG,CAAC,GAAG,CAAC,yBAAyB,EAAE,yBAAyB,CAAC,CAAC;YAE9D,GAAG,CAAC,IAAI,CAAC;;;qCAGsB,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;uCAGhC,WAAW;;;OAG3C,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;QAC3B,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -20,9 +20,11 @@ export async function startBundleServer(session) {
|
|
|
20
20
|
app.get('*', async (req, res) => {
|
|
21
21
|
const requestPath = slash(req.path.substring(1));
|
|
22
22
|
const { packageName, version, filePath } = parseRequestInfo(requestPath);
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
23
|
+
const packageEntry = resolveMap[packageName];
|
|
24
|
+
const packagePath = !!version && packageEntry?.version === version
|
|
25
|
+
? packageEntry?.path
|
|
26
|
+
: packageEntry?.scopedVersions?.[version]?.path;
|
|
27
|
+
const force = req.query.force !== undefined;
|
|
26
28
|
console.log(`BundleServer: Request: "${packageName}@${version}${filePath}"`);
|
|
27
29
|
// If the package is missing, invalid arguments.
|
|
28
30
|
if (!requestPath || !packageName) {
|
|
@@ -38,23 +40,26 @@ export async function startBundleServer(session) {
|
|
|
38
40
|
res.status(404).send(`Unrecognized package "${packageName}".`);
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
41
|
-
res.redirect(`/${packageName}@${resolvedPackage.version}
|
|
43
|
+
res.redirect(`/${packageName}@${resolvedPackage.version}${filePath}`);
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
// If it's an unrecognized package, 404.
|
|
45
47
|
if (!packagePath) {
|
|
46
48
|
console.log(`BundleServer: Response (404): "${packageName}@${version}${filePath}"`);
|
|
47
|
-
res
|
|
49
|
+
res
|
|
50
|
+
.status(404)
|
|
51
|
+
.send(`The requested package "${packageName}@${version}${filePath}" was not found in the resolve map.`);
|
|
48
52
|
return;
|
|
49
53
|
}
|
|
50
54
|
// Create an identifier for the bundle.
|
|
55
|
+
const isExternal = isExternalPackage(packagePath);
|
|
51
56
|
const bundleId = hash({
|
|
52
57
|
name: packageName,
|
|
53
58
|
version: isExternal ? version : packagePath,
|
|
54
59
|
mode: session.mode,
|
|
55
60
|
});
|
|
56
61
|
// Derive where the output should be.
|
|
57
|
-
const outputPath = path.join(os.tmpdir(), 'cloudpack-output', `${filenamify(packageName)}-${
|
|
62
|
+
const outputPath = path.join(os.tmpdir(), 'cloudpack-output', `${filenamify(packageName)}-${version}-${bundleId}`);
|
|
58
63
|
let action = createdBundles[bundleId];
|
|
59
64
|
// If we haven't completed this bundle, enqueue it or piggyback on an existing run.
|
|
60
65
|
if (!action || force) {
|
|
@@ -64,25 +69,33 @@ export async function startBundleServer(session) {
|
|
|
64
69
|
pendingAction = pendingBundles[bundleId] = new Promise((resolve) => {
|
|
65
70
|
// Async helper so that we can await and call resolve.
|
|
66
71
|
async function createBundle() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
packagePath,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
72
|
+
try {
|
|
73
|
+
console.log(`BundleServer: No previous action found, bundling: "${packageName}@${version}${filePath}"`);
|
|
74
|
+
await ensureDir(outputPath);
|
|
75
|
+
// This check shouldn't be required because we throw above if packagePath is undefined,
|
|
76
|
+
// but TypeScript insists it is necessary.
|
|
77
|
+
if (packagePath) {
|
|
78
|
+
const bundlerResult = await bundlePackage({
|
|
79
|
+
packagePath,
|
|
80
|
+
outputPath,
|
|
81
|
+
outputType: 'library',
|
|
82
|
+
});
|
|
83
|
+
console.log(`BundleServer: Bundle complete: ${outputPath}`);
|
|
84
|
+
createdBundles[bundleId] = {
|
|
85
|
+
id: bundleId,
|
|
86
|
+
packageName: packageName,
|
|
87
|
+
packageVersion: version,
|
|
88
|
+
packagePath,
|
|
89
|
+
outputPath,
|
|
90
|
+
result: bundlerResult.errors?.length == 0 ? 'success' : 'errors',
|
|
91
|
+
errors: bundlerResult.errors,
|
|
92
|
+
warnings: bundlerResult.warnings,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
delete pendingBundles[bundleId];
|
|
98
|
+
}
|
|
86
99
|
return createdBundles[bundleId];
|
|
87
100
|
}
|
|
88
101
|
// Call the async function and tie it in with the promise.
|
|
@@ -108,7 +121,7 @@ export async function startBundleServer(session) {
|
|
|
108
121
|
}
|
|
109
122
|
});
|
|
110
123
|
});
|
|
111
|
-
console.log(`
|
|
124
|
+
console.log(`BundleServer: started (http://localhost:${port})`);
|
|
112
125
|
return {
|
|
113
126
|
close: () => {
|
|
114
127
|
writeJsonSync(bundleLookupPath, createdBundles);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startBundleServer.js","sourceRoot":"","sources":["../../../src/commands/start/startBundleServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;AAE9B,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;AAgBxF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAgB;IACtD,MAAM,cAAc,GAAkC,CAAC,MAAM,QAAQ,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/F,MAAM,cAAc,GAA2C,EAAE,CAAC;IAClE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,gBAAgB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,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,GAAG,CAAC,kDAAkD,WAAW,IAAI,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC;iBACrG;gBAED,MAAM,GAAG,MAAM,aAAa,CAAC;aAC9B;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,4CAA4C,WAAW,IAAI,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC;aAC/F;YAED,qDAAqD;YACrD,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE;gBAC9B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC3C;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,oCAAoC,WAAW,IAAI,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC;gBACtF,4BAA4B;gBAC5B,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;aAC/C;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,2CAA2C,IAAI,GAAG,CAAC,CAAC;IAEhE,OAAO;QACL,KAAK,EAAE,GAAG,EAAE;YACV,aAAa,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QACD,IAAI;KACL,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "The Cloudpack command line interface - a tool for managing fast inner and outer looping in web apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"cloudpack": "./lib/cloudpack.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@ms-cloudpack/bundler": "^0.1.
|
|
19
|
+
"@ms-cloudpack/bundler": "^0.1.3",
|
|
20
20
|
"@ms-cloudpack/create-express-app": "^0.1.0",
|
|
21
21
|
"@ms-cloudpack/json-utilities": "^0.0.3",
|
|
22
|
-
"@ms-cloudpack/package-utilities": "^0.
|
|
23
|
-
"@ms-cloudpack/path-utilities": "^0.
|
|
22
|
+
"@ms-cloudpack/package-utilities": "^0.4.0",
|
|
23
|
+
"@ms-cloudpack/path-utilities": "^0.3.0",
|
|
24
24
|
"commander": "^9.1.0",
|
|
25
25
|
"filenamify": "^5.1.0",
|
|
26
26
|
"fs-extra": "^10.1.0",
|