@autometa/app 0.3.4 → 0.3.5
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/.turbo/turbo-build.log +21 -0
- package/.turbo/turbo-clean.log +4 -0
- package/.turbo/turbo-coverage.log +22 -0
- package/.turbo/turbo-lint$colon$fix.log +4 -0
- package/.turbo/turbo-lint.log +4 -0
- package/.turbo/turbo-lint:fix.log +4 -0
- package/.turbo/turbo-prettify.log +0 -0
- package/.turbo/turbo-test.log +12 -0
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/esm/index.js +6 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
- package/tsup.config.ts +1 -1
- package/vite.config.ts +10 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
> @autometa/app@0.0.0 build /Users/ben.aherne/Documents/GitHub/autometa/packages/app
|
|
3
|
+
> tsup
|
|
4
|
+
|
|
5
|
+
CLI Building entry: src/index.ts
|
|
6
|
+
CLI Using tsconfig: tsconfig.json
|
|
7
|
+
CLI tsup v6.7.0
|
|
8
|
+
CLI Using tsup config: /Users/ben.aherne/Documents/GitHub/autometa/packages/app/tsup.config.ts
|
|
9
|
+
CLI Target: es2020
|
|
10
|
+
CLI Cleaning output folder
|
|
11
|
+
CJS Build start
|
|
12
|
+
ESM Build start
|
|
13
|
+
CJS You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
|
|
14
|
+
ESM You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
|
|
15
|
+
ESM dist/esm/index.js 1.18 KB
|
|
16
|
+
ESM ⚡️ Build success in 9ms
|
|
17
|
+
CJS dist/index.js 2.43 KB
|
|
18
|
+
CJS ⚡️ Build success in 9ms
|
|
19
|
+
DTS Build start
|
|
20
|
+
DTS ⚡️ Build success in 599ms
|
|
21
|
+
DTS dist/index.d.ts 1.59 KB
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
> @autometa/app@0.1.1 coverage /Users/ben.aherne/Documents/GitHub/autometa/packages/app
|
|
3
|
+
> vitest run --coverage
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
RUN v0.33.0 /Users/ben.aherne/Documents/GitHub/autometa/packages/app
|
|
7
|
+
Coverage enabled with istanbul
|
|
8
|
+
|
|
9
|
+
✓ src/decorators/fixture.spec.ts (2 tests) 3ms
|
|
10
|
+
|
|
11
|
+
Test Files 1 passed (1)
|
|
12
|
+
Tests 2 passed (2)
|
|
13
|
+
Start at 16:39:00
|
|
14
|
+
Duration 1.78s (transform 295ms, setup 0ms, collect 423ms, tests 3ms, environment 0ms, prepare 511ms)
|
|
15
|
+
|
|
16
|
+
% Coverage report from istanbul
|
|
17
|
+
------------|---------|----------|---------|---------|-------------------
|
|
18
|
+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
|
19
|
+
------------|---------|----------|---------|---------|-------------------
|
|
20
|
+
All files | 66.66 | 75 | 50 | 66.66 |
|
|
21
|
+
fixture.ts | 66.66 | 75 | 50 | 66.66 | 50-52
|
|
22
|
+
------------|---------|----------|---------|---------|-------------------
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
> @autometa/app@0.3.4 test /Users/ben.aherne/Documents/GitHub/autometa/packages/app
|
|
3
|
+
> vitest run --passWithNoTests
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
RUN v1.4.0 /Users/ben.aherne/Documents/GitHub/autometa/packages/app
|
|
7
|
+
|
|
8
|
+
include: **/*.{test,spec}.?(c|m)[jt]s?(x)
|
|
9
|
+
exclude: **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*
|
|
10
|
+
watch exclude: **/node_modules/**, **/dist/**
|
|
11
|
+
No test files found, exiting with code 0
|
|
12
|
+
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -8,14 +8,12 @@ var AutometaWorld = class {
|
|
|
8
8
|
|
|
9
9
|
// src/get-app.ts
|
|
10
10
|
import { v4 } from "uuid";
|
|
11
|
-
import {
|
|
12
|
-
Container,
|
|
13
|
-
defineContainerContext
|
|
14
|
-
} from "@autometa/injection";
|
|
11
|
+
import { Container, defineContainerContext } from "@autometa/injection";
|
|
15
12
|
function getApp(appType, containerName = v4()) {
|
|
16
13
|
const context = defineContainerContext(containerName);
|
|
17
14
|
const container = new Container(context);
|
|
18
15
|
const app = container.get(appType);
|
|
16
|
+
app.di = container;
|
|
19
17
|
return app;
|
|
20
18
|
}
|
|
21
19
|
|
|
@@ -28,7 +26,10 @@ function AppType(container, world, environment = "default") {
|
|
|
28
26
|
key: "world",
|
|
29
27
|
class: world
|
|
30
28
|
});
|
|
31
|
-
container[env] = {
|
|
29
|
+
container[env] = {
|
|
30
|
+
app: target,
|
|
31
|
+
world
|
|
32
|
+
};
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
export {
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/autometa-app.ts","../../src/autometa-world.ts","../../src/get-app.ts","../../src/decorators/app-type.ts"],"sourcesContent":["import { World } from \"./fixtures.typings\";\nexport abstract class AutometaApp {\n id: string;\n [key: string]: unknown;\n world: World;\n}\n","export class AutometaWorld {}\n","import { AutometaApp } from \"./autometa-app\";\nimport { Class } from \"@autometa/types\";\nimport { v4 } from \"uuid\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/autometa-app.ts","../../src/autometa-world.ts","../../src/get-app.ts","../../src/decorators/app-type.ts"],"sourcesContent":["import { World } from \"./fixtures.typings\";\nexport abstract class AutometaApp {\n id: string;\n [key: string]: unknown;\n world: World;\n}\n","export class AutometaWorld {}\n","import { AutometaApp } from \"./autometa-app\";\nimport { Class } from \"@autometa/types\";\nimport { v4 } from \"uuid\";\nimport { Container, defineContainerContext } from \"@autometa/injection\";\nimport { App } from \"./fixtures.typings\";\nexport function getApp<T extends AutometaApp>(\n appType: Class<T>,\n containerName = v4()\n): App {\n const context = defineContainerContext(containerName);\n const container = new Container(context);\n const app = container.get<App>(appType);\n app.di = container;\n return app;\n}\n","import { Class } from \"@autometa/types\";\nimport { App, World, AutometaWorld } from \"..\";\nimport { metadata } from \"@autometa/injection\";\nexport function AppType(\n container: Record<string, { app: Class<App>; world: Class<World> }>,\n world: Class<AutometaWorld>,\n environment = \"default\"\n) {\n const env = environment ?? \"default\";\n return (target: Class<unknown>) => {\n metadata(target).set({\n key: \"world\",\n class: world,\n });\n container[env] = {\n app: target as Class<App>,\n world: world as Class<World>,\n };\n };\n}\n"],"mappings":";AACO,IAAe,cAAf,MAA2B;AAIlC;;;ACLO,IAAM,gBAAN,MAAoB;AAAC;;;ACE5B,SAAS,UAAU;AACnB,SAAS,WAAW,8BAA8B;AAE3C,SAAS,OACd,SACA,gBAAgB,GAAG,GACd;AACL,QAAM,UAAU,uBAAuB,aAAa;AACpD,QAAM,YAAY,IAAI,UAAU,OAAO;AACvC,QAAM,MAAM,UAAU,IAAS,OAAO;AACtC,MAAI,KAAK;AACT,SAAO;AACT;;;ACZA,SAAS,gBAAgB;AAClB,SAAS,QACd,WACA,OACA,cAAc,WACd;AACA,QAAM,MAAM,eAAe;AAC3B,SAAO,CAAC,WAA2B;AACjC,aAAS,MAAM,EAAE,IAAI;AAAA,MACnB,KAAK;AAAA,MACL,OAAO;AAAA,IACT,CAAC;AACD,cAAU,GAAG,IAAI;AAAA,MACf,KAAK;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ function getApp(appType, containerName = (0, import_uuid.v4)()) {
|
|
|
42
42
|
const context = (0, import_injection.defineContainerContext)(containerName);
|
|
43
43
|
const container = new import_injection.Container(context);
|
|
44
44
|
const app = container.get(appType);
|
|
45
|
+
app.di = container;
|
|
45
46
|
return app;
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -54,7 +55,10 @@ function AppType(container, world, environment = "default") {
|
|
|
54
55
|
key: "world",
|
|
55
56
|
class: world
|
|
56
57
|
});
|
|
57
|
-
container[env] = {
|
|
58
|
+
container[env] = {
|
|
59
|
+
app: target,
|
|
60
|
+
world
|
|
61
|
+
};
|
|
58
62
|
};
|
|
59
63
|
}
|
|
60
64
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/autometa-app.ts","../src/autometa-world.ts","../src/get-app.ts","../src/decorators/app-type.ts"],"sourcesContent":["export * from \"./autometa-app\";\nexport * from \"./autometa-world\";\nexport * from \"./get-app\";\nexport * from \"./decorators\";\nexport * from \"./fixtures.typings\";\n","import { World } from \"./fixtures.typings\";\nexport abstract class AutometaApp {\n id: string;\n [key: string]: unknown;\n world: World;\n}\n","export class AutometaWorld {}\n","import { AutometaApp } from \"./autometa-app\";\nimport { Class } from \"@autometa/types\";\nimport { v4 } from \"uuid\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/autometa-app.ts","../src/autometa-world.ts","../src/get-app.ts","../src/decorators/app-type.ts"],"sourcesContent":["export * from \"./autometa-app\";\nexport * from \"./autometa-world\";\nexport * from \"./get-app\";\nexport * from \"./decorators\";\nexport * from \"./fixtures.typings\";\n","import { World } from \"./fixtures.typings\";\nexport abstract class AutometaApp {\n id: string;\n [key: string]: unknown;\n world: World;\n}\n","export class AutometaWorld {}\n","import { AutometaApp } from \"./autometa-app\";\nimport { Class } from \"@autometa/types\";\nimport { v4 } from \"uuid\";\nimport { Container, defineContainerContext } from \"@autometa/injection\";\nimport { App } from \"./fixtures.typings\";\nexport function getApp<T extends AutometaApp>(\n appType: Class<T>,\n containerName = v4()\n): App {\n const context = defineContainerContext(containerName);\n const container = new Container(context);\n const app = container.get<App>(appType);\n app.di = container;\n return app;\n}\n","import { Class } from \"@autometa/types\";\nimport { App, World, AutometaWorld } from \"..\";\nimport { metadata } from \"@autometa/injection\";\nexport function AppType(\n container: Record<string, { app: Class<App>; world: Class<World> }>,\n world: Class<AutometaWorld>,\n environment = \"default\"\n) {\n const env = environment ?? \"default\";\n return (target: Class<unknown>) => {\n metadata(target).set({\n key: \"world\",\n class: world,\n });\n container[env] = {\n app: target as Class<App>,\n world: world as Class<World>,\n };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAe,cAAf,MAA2B;AAIlC;;;ACLO,IAAM,gBAAN,MAAoB;AAAC;;;ACE5B,kBAAmB;AACnB,uBAAkD;AAE3C,SAAS,OACd,SACA,oBAAgB,gBAAG,GACd;AACL,QAAM,cAAU,yCAAuB,aAAa;AACpD,QAAM,YAAY,IAAI,2BAAU,OAAO;AACvC,QAAM,MAAM,UAAU,IAAS,OAAO;AACtC,MAAI,KAAK;AACT,SAAO;AACT;;;ACZA,IAAAA,oBAAyB;AAClB,SAAS,QACd,WACA,OACA,cAAc,WACd;AACA,QAAM,MAAM,eAAe;AAC3B,SAAO,CAAC,WAA2B;AACjC,oCAAS,MAAM,EAAE,IAAI;AAAA,MACnB,KAAK;AAAA,MACL,OAAO;AAAA,IACT,CAAC;AACD,cAAU,GAAG,IAAI;AAAA,MACf,KAAK;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACF;","names":["import_injection"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autometa/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "App and World container for Autometa",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@autometa/types": "^0.4.1",
|
|
18
17
|
"@types/node": "^18.11.18",
|
|
19
18
|
"@types/uuid": "^9.0.5",
|
|
20
19
|
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
|
21
20
|
"@typescript-eslint/parser": "^5.54.1",
|
|
22
|
-
"@vitest/coverage-istanbul": "^
|
|
21
|
+
"@vitest/coverage-istanbul": "^1.4.0",
|
|
22
|
+
"@vitest/coverage-v8": "^1.4.0",
|
|
23
23
|
"asserters": "link:packages/asserters",
|
|
24
24
|
"autometa": "link:packages/autometa",
|
|
25
25
|
"config": "link:packages/config",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"datetime": "link:packages/datetime",
|
|
29
29
|
"errors": "link:packages/errors",
|
|
30
30
|
"eslint": "^8.37.0",
|
|
31
|
-
"eslint-config-custom": "0.6.0",
|
|
32
31
|
"eslint-config-prettier": "^8.3.0",
|
|
33
32
|
"events": "link:packages/events",
|
|
34
33
|
"gherkin": "link:packages/gherkin",
|
|
@@ -41,20 +40,22 @@
|
|
|
41
40
|
"scopes": "link:packages/scopes",
|
|
42
41
|
"test-builder": "link:packages/test-builder",
|
|
43
42
|
"test-executor": "link:packages/test-executor",
|
|
44
|
-
"tsconfig": " *",
|
|
45
43
|
"tsup": "^7.2.0",
|
|
46
44
|
"types": "link:packages/types",
|
|
47
45
|
"typescript": "^4.9.5",
|
|
48
|
-
"vitest": "
|
|
46
|
+
"vitest": "1.4.0",
|
|
47
|
+
"@autometa/types": "^0.4.1",
|
|
48
|
+
"tsconfig": "0.7.0",
|
|
49
|
+
"eslint-config-custom": "0.6.0"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
52
|
+
"tsyringe": "^4.8.0",
|
|
53
|
+
"uuid": "^9.0.1",
|
|
54
|
+
"@autometa/injection": "^0.1.3",
|
|
51
55
|
"@autometa/asserters": "0.1.8",
|
|
52
56
|
"@autometa/errors": "0.2.2",
|
|
53
57
|
"@autometa/fixture-proxies": "^0.1.3",
|
|
54
|
-
"@autometa/
|
|
55
|
-
"@autometa/phrases": "0.1.12",
|
|
56
|
-
"tsyringe": "^4.8.0",
|
|
57
|
-
"uuid": "^9.0.1"
|
|
58
|
+
"@autometa/phrases": "0.1.12"
|
|
58
59
|
},
|
|
59
60
|
"scripts": {
|
|
60
61
|
"test": "vitest run --passWithNoTests",
|
|
@@ -65,6 +66,5 @@
|
|
|
65
66
|
"clean": "rimraf dist",
|
|
66
67
|
"build": "tsup",
|
|
67
68
|
"build:watch": "tsup --watch"
|
|
68
|
-
}
|
|
69
|
-
"readme": "# Introduction\n\nThere's nothing here yet"
|
|
69
|
+
}
|
|
70
70
|
}
|
package/tsup.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ export default defineConfig({
|
|
|
4
4
|
clean: true, // clean up the dist folder
|
|
5
5
|
format: ["cjs", "esm"], // generate cjs and esm files
|
|
6
6
|
dts: true,
|
|
7
|
-
sourcemap:true, // generate sourcemaps
|
|
7
|
+
sourcemap: true, // generate sourcemaps
|
|
8
8
|
skipNodeModulesBundle: true,
|
|
9
9
|
entryPoints: ["src/index.ts"],
|
|
10
10
|
target: "es2020",
|