create-squire-workspace 0.0.30 → 0.0.80
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/index.d.ts +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +8 -8
- package/workspace-architect.d.ts +9 -0
- package/workspace-architect.js +47 -0
- package/workspace-architect.js.map +1 -0
- package/create-space.d.ts +0 -2
- package/create-space.js +0 -13
- package/create-space.js.map +0 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './workspace-architect';
|
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../squire/architect/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-squire-workspace",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.80",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"bin": "./workspace-architect.js",
|
|
6
7
|
"dependencies": {
|
|
7
8
|
"@code-squire/common": "latest",
|
|
8
9
|
"@code-squire/utils": "latest",
|
|
@@ -11,9 +12,8 @@
|
|
|
11
12
|
"@code-squire/node-cli": "latest",
|
|
12
13
|
"@code-squire/typescript": "latest",
|
|
13
14
|
"@code-squire/terminal": "latest",
|
|
14
|
-
"@code-squire/feature-modules": "latest"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"@code-squire/ioc": "latest"
|
|
15
|
+
"@code-squire/feature-modules": "latest",
|
|
16
|
+
"@code-squire/ioc": "latest",
|
|
17
|
+
"@code-squire/workspace": "latest"
|
|
18
18
|
}
|
|
19
|
-
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
import { Cli } from "@code-squire/node-cli";
|
|
12
|
+
import { Constructor } from "@code-squire/composition";
|
|
13
|
+
import { FeatureModuleRegistry } from "@code-squire/feature-modules";
|
|
14
|
+
import { instance, Service } from "@code-squire/ioc";
|
|
15
|
+
import { GeneratorRegistry, WorkspaceModule, WorkspaceScheduler } from "@code-squire/workspace";
|
|
16
|
+
let WorkspaceArchitect = class WorkspaceArchitect {
|
|
17
|
+
modules = [WorkspaceModule];
|
|
18
|
+
async runCommand() {
|
|
19
|
+
this.broadcast();
|
|
20
|
+
const registry = instance(GeneratorRegistry);
|
|
21
|
+
const scheduler = instance(WorkspaceScheduler);
|
|
22
|
+
await registry.virtualize();
|
|
23
|
+
const generator = await registry.getGenerator('@code-squire/workspace', 'workspace');
|
|
24
|
+
const [name] = process.argv.slice(2);
|
|
25
|
+
scheduler.schedule({ task: generator, options: { name } });
|
|
26
|
+
const { success } = await scheduler.run();
|
|
27
|
+
success && console.log('Workspace created!');
|
|
28
|
+
}
|
|
29
|
+
broadcast() {
|
|
30
|
+
const registry = instance(FeatureModuleRegistry);
|
|
31
|
+
this.modules.forEach(module => registry.register(module));
|
|
32
|
+
registry.broadcastAll();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
Constructor(),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", []),
|
|
39
|
+
__metadata("design:returntype", Promise)
|
|
40
|
+
], WorkspaceArchitect.prototype, "runCommand", null);
|
|
41
|
+
WorkspaceArchitect = __decorate([
|
|
42
|
+
Service(),
|
|
43
|
+
Cli()
|
|
44
|
+
], WorkspaceArchitect);
|
|
45
|
+
export { WorkspaceArchitect };
|
|
46
|
+
instance(WorkspaceArchitect);
|
|
47
|
+
//# sourceMappingURL=workspace-architect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-architect.js","sourceRoot":"","sources":["../../../../squire/architect/src/workspace-architect.ts"],"names":[],"mappings":";;;;;;;;;;AAEA,OAAO,EAAE,GAAG,EAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAuB,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMzF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACrB,OAAO,GAA0B,CAAE,eAAe,CAAE,CAAC;IAGvD,AAAN,KAAK,CAAC,UAAU;QACd,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,MAAM,QAAQ,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;QAC/C,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;QAE5B,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;QACrF,MAAM,CAAE,IAAI,CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvC,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAC,CAAC,CAAC;QAC1D,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC;QAE1C,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC/C,CAAC;IAEO,SAAS;QACf,MAAM,QAAQ,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;QAEjD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAC1D,QAAQ,CAAC,YAAY,EAAE,CAAC;IAC1B,CAAC;CACF,CAAA;AArBO;IADL,WAAW,EAAE;;;;oDAcb;AAjBU,kBAAkB;IAF9B,OAAO,EAAE;IACT,GAAG,EAAE;GACO,kBAAkB,CAyB9B;;AAED,QAAQ,CAAC,kBAAkB,CAAC,CAAC"}
|
package/create-space.d.ts
DELETED
package/create-space.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env tsx
|
|
2
|
-
import { instance } from "@code-squire/ioc";
|
|
3
|
-
import { FeatureModuleRegistry } from "@code-squire/feature-modules";
|
|
4
|
-
import { WorkspaceModule } from "@code-squire/workspace";
|
|
5
|
-
import { SqVirtualFileSystem } from "@code-squire/vfs";
|
|
6
|
-
instance(FeatureModuleRegistry).broadcastSpecific([
|
|
7
|
-
{ module: WorkspaceModule, parameters: [] }
|
|
8
|
-
]);
|
|
9
|
-
const vfs = instance(SqVirtualFileSystem);
|
|
10
|
-
const virtualRoot = vfs.createVirtualRoot(process.cwd());
|
|
11
|
-
const virtualApi = await virtualRoot.virtualize();
|
|
12
|
-
console.log('Ready to generate with the api', !!virtualApi);
|
|
13
|
-
//# sourceMappingURL=create-space.js.map
|
package/create-space.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-space.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/create-space.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,QAAQ,CAAC,qBAAqB,CAAC,CAAC,iBAAiB,CAAC;IAChD,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,GAAG,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAC1C,MAAM,WAAW,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;AACzD,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,CAAC;AAElD,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC"}
|