@haibun/domain-storage 1.5.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.
@@ -0,0 +1,28 @@
1
+ /// <reference types="node" />
2
+ import { AStepper, TLocationOptions, TNamed, TOptions, TResult, TTag, TWorld } from "@haibun/core/build/lib/defs";
3
+ export declare abstract class AStorage extends AStepper {
4
+ abstract readFile(path: string, coding?: string): any;
5
+ abstract readdir(dir: string): any;
6
+ abstract writeFileBuffer(file: string, contents: Buffer): void;
7
+ writeFile(file: string, contents: string | Buffer): Promise<void>;
8
+ abstract stat(dir: string): any;
9
+ abstract mkdir(dir: string): any;
10
+ abstract mkdirp(dir: string): any;
11
+ abstract exists(ntt: string): any;
12
+ rmrf(dir: string): Promise<void>;
13
+ getCaptureDir({ options, tag }: {
14
+ options: TOptions;
15
+ tag: TTag;
16
+ }, app?: string): Promise<string>;
17
+ pathed(f: string): string;
18
+ writeTraceFile(world: TWorld, result: TResult): Promise<void>;
19
+ ensureCaptureDir(loc: TLocationOptions, app: string | undefined, fn?: string): Promise<string>;
20
+ steps: {
21
+ readFile: {
22
+ gwta: string;
23
+ action: ({ where }: TNamed) => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
24
+ };
25
+ };
26
+ }
27
+ export declare const BASE_STORAGE: string;
28
+ //# sourceMappingURL=AStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AStorage.d.ts","sourceRoot":"","sources":["../src/AStorage.ts"],"names":[],"mappings":";AAAA,OAAO,EAAwB,QAAQ,EAAM,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE5I,8BAAsB,QAAS,SAAQ,QAAQ;IAC3C,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG;IACrD,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAClC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAExD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAOvD,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM;IACzB,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM;IAC1B,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM;IAC3B,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM;IACrB,IAAI,CAAC,GAAG,EAAE,MAAM;IAIhB,aAAa,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,IAAI,CAAA;KAAE,EAAE,GAAG,CAAC,EAAE,MAAM;IAOpF,MAAM,CAAC,CAAC,EAAE,MAAM;IAIV,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;IAK7C,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,SAAK;IAY9E,KAAK;;;gCAG6B,MAAM;;MAKvC;CACJ;AAED,eAAO,MAAM,YAAY,QAA0B,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASE_STORAGE = exports.AStorage = void 0;
4
+ const defs_1 = require("@haibun/core/build/lib/defs");
5
+ class AStorage extends defs_1.AStepper {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.steps = {
9
+ readFile: {
10
+ gwta: `read text from {where: STORAGE_ITEM}`,
11
+ action: async ({ where }) => {
12
+ const text = await this.readFile(where, 'utf-8');
13
+ return defs_1.OK;
14
+ }
15
+ }
16
+ };
17
+ }
18
+ async writeFile(file, contents) {
19
+ if (typeof contents === 'string') {
20
+ await this.writeFileBuffer(file, Buffer.from(contents));
21
+ }
22
+ await this.writeFileBuffer(file, contents);
23
+ }
24
+ async rmrf(dir) {
25
+ throw Error('not implemented');
26
+ }
27
+ async getCaptureDir({ options, tag }, app) {
28
+ const p = [options.base, options.CAPTURE_DIR || defs_1.CAPTURE, `loop-${tag.loop}`, `seq-${tag.sequence}`, `featn-${tag.featureNum}`, `mem-${tag.member}`];
29
+ app && p.push(app);
30
+ return this.pathed('.' + p.join('/'));
31
+ }
32
+ // overload this where / conventions aren't used
33
+ pathed(f) {
34
+ return f;
35
+ }
36
+ async writeTraceFile(world, result) {
37
+ const dir = await this.ensureCaptureDir(world, 'trace', `trace.json`);
38
+ this.writeFile(dir, JSON.stringify(result, null, 2));
39
+ }
40
+ async ensureCaptureDir(loc, app, fn = '') {
41
+ const dir = await this.getCaptureDir(loc, app);
42
+ if (!this.exists(dir)) {
43
+ try {
44
+ this.mkdirp(dir);
45
+ }
46
+ catch (e) {
47
+ throw Error(`creating ${dir}: ${e}`);
48
+ }
49
+ }
50
+ return `${dir}/${fn}`;
51
+ }
52
+ }
53
+ exports.AStorage = AStorage;
54
+ exports.BASE_STORAGE = `${defs_1.BASE_PREFIX}STORAGE`;
55
+ //# sourceMappingURL=AStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AStorage.js","sourceRoot":"","sources":["../src/AStorage.ts"],"names":[],"mappings":";;;AAAA,sDAA4I;AAE5I,MAAsB,QAAS,SAAQ,eAAQ;IAA/C;;QAgDI,UAAK,GAAG;YACJ,QAAQ,EAAE;gBACN,IAAI,EAAE,sCAAsC;gBAC5C,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAU,EAAE,EAAE;oBAChC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;oBACjD,OAAO,SAAE,CAAC;gBACd,CAAC;aACJ;SACJ,CAAA;IACL,CAAC;IApDG,KAAK,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E,GAAuB,EAAE,EAAE,GAAG,EAAE;QAC1E,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YACnB,IAAI;gBACA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aACpB;YAAC,OAAO,CAAC,EAAE;gBACR,MAAM,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;aACvC;SACJ;QACD,OAAO,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC;IAC1B,CAAC;CAWJ;AAzDD,4BAyDC;AAEY,QAAA,YAAY,GAAG,GAAG,kBAAW,SAAS,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" />
2
+ import { AStepper, TNamed } from "@haibun/core/build/lib/defs";
3
+ export declare abstract class AStorage extends AStepper {
4
+ abstract readFile(path: string, coding: string): any;
5
+ abstract readdir(dir: string): any;
6
+ abstract writeFile(file: string, contents: Buffer): any;
7
+ steps: {
8
+ readFile: {
9
+ gwta: string;
10
+ action: ({ where }: TNamed) => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
11
+ };
12
+ };
13
+ }
14
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAM,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAEnE,8BAAsB,QAAS,SAAQ,QAAQ;IAC3C,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG;IACpD,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAClC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IACjD,KAAK;;;gCAG6B,MAAM;;MAKvC;CACJ"}
package/build/defs.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AStorage = void 0;
4
+ const defs_1 = require("@haibun/core/build/lib/defs");
5
+ class AStorage extends defs_1.AStepper {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.steps = {
9
+ readFile: {
10
+ gwta: `read text from {where: STORAGE_ITEM}`,
11
+ action: async ({ where }) => {
12
+ const text = await this.readFile(where, 'utf-8');
13
+ return defs_1.OK;
14
+ }
15
+ }
16
+ };
17
+ }
18
+ }
19
+ exports.AStorage = AStorage;
20
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":";;;AAAA,sDAAmE;AAEnE,MAAsB,QAAS,SAAQ,eAAQ;IAA/C;;QAII,UAAK,GAAG;YACJ,QAAQ,EAAE;gBACN,IAAI,EAAE,sCAAsC;gBAC5C,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAU,EAAE,EAAE;oBAChC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;oBACjD,OAAO,SAAE,CAAC;gBACd,CAAC;aACJ;SACJ,CAAA;IACL,CAAC;CAAA;AAbD,4BAaC"}
@@ -0,0 +1,46 @@
1
+ import { WorkspaceContext } from '@haibun/core/build/lib/contexts';
2
+ import { TNamed, TVStep, AStepper, TFromDomain, TFileTypeDomain } from '@haibun/core/build/lib/defs';
3
+ export declare const STORAGE_LOCATION = "STORAGE_LOCATION";
4
+ export declare const STORAGE_ITEM = "STORAGE_ITEM";
5
+ export declare const storageLocation: TFileTypeDomain;
6
+ export declare const storageItem: TFromDomain;
7
+ declare const DomainStorage: {
8
+ new (): {
9
+ domains: (TFromDomain | TFileTypeDomain)[];
10
+ locator: (location: string) => string;
11
+ options: {
12
+ BASE_DIRECTORY: {
13
+ desc: string;
14
+ parse: (input: string) => {
15
+ error: string;
16
+ result?: undefined;
17
+ } | {
18
+ result: string;
19
+ error?: undefined;
20
+ };
21
+ };
22
+ };
23
+ steps: {
24
+ aLocation: {
25
+ gwta: string;
26
+ action: ({ where }: TNamed, vstep: TVStep) => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
27
+ };
28
+ anItem: {
29
+ gwta: string;
30
+ action: ({ name }: TNamed) => Promise<import("@haibun/core/build/lib/defs").TOKActionResult>;
31
+ build: ({ name }: TNamed, a: TVStep, workspace: WorkspaceContext) => Promise<{
32
+ ok: true;
33
+ topics?: import("@haibun/core/build/lib/defs").TActionResultTopics | undefined;
34
+ }>;
35
+ };
36
+ };
37
+ world?: import("@haibun/core/build/lib/defs").TWorld | undefined;
38
+ close?(): void;
39
+ endFeature?(): void;
40
+ onFailure?(result: import("@haibun/core/build/lib/defs").TStepResult): void;
41
+ setWorld(world: import("@haibun/core/build/lib/defs").TWorld, steppers: AStepper[]): void;
42
+ getWorld(): import("@haibun/core/build/lib/defs").TWorld;
43
+ };
44
+ };
45
+ export default DomainStorage;
46
+ //# sourceMappingURL=domain-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-storage.d.ts","sourceRoot":"","sources":["../src/domain-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAe,MAAM,EAAE,MAAM,EAAM,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,6BAA6B,CAAC;AAGnI,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,eAAO,MAAM,eAAe,EAAE,eAI7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAA0E,CAAC;AAErG,QAAA,MAAM,aAAa;;;4BAKI,MAAM;;;;+BAIR,MAAM;;;;;;;;;;;;oCAMK,MAAM,SAAS,MAAM;;;;mCAOtB,MAAM;kCAGP,MAAM,KAAK,MAAM,aAAa,gBAAgB;;;;;;;;;;;;;CAM3E,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.storageItem = exports.storageLocation = exports.STORAGE_ITEM = exports.STORAGE_LOCATION = void 0;
4
+ const defs_1 = require("@haibun/core/build/lib/defs");
5
+ const util_1 = require("@haibun/core/build/lib/util");
6
+ exports.STORAGE_LOCATION = 'STORAGE_LOCATION';
7
+ exports.STORAGE_ITEM = 'STORAGE_ITEM';
8
+ exports.storageLocation = {
9
+ name: exports.STORAGE_LOCATION, fileType: exports.STORAGE_LOCATION, is: 'string', validate: (content) => {
10
+ return undefined;
11
+ }
12
+ };
13
+ exports.storageItem = { name: exports.STORAGE_ITEM, from: exports.STORAGE_LOCATION, is: 'string' };
14
+ const DomainStorage = class DomainStorage extends defs_1.AStepper {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.domains = [
18
+ exports.storageLocation,
19
+ exports.storageItem,
20
+ ];
21
+ this.locator = (location) => `http://localhost:8123/${location}`;
22
+ this.options = {
23
+ BASE_DIRECTORY: {
24
+ desc: 'run browsers without a window (true or false)',
25
+ parse: (input) => (0, util_1.stringOrError)(input)
26
+ }
27
+ };
28
+ this.steps = {
29
+ aLocation: {
30
+ gwta: `a ${exports.STORAGE_LOCATION} at {where}`,
31
+ action: async ({ where }, vstep) => {
32
+ const location = vstep.source.name;
33
+ return defs_1.OK;
34
+ },
35
+ },
36
+ anItem: {
37
+ gwta: `A ${exports.STORAGE_ITEM} {name}`,
38
+ action: async ({ name }) => {
39
+ return defs_1.OK;
40
+ },
41
+ build: async ({ name }, a, workspace) => {
42
+ workspace.getBuilder().addControl(name);
43
+ return { ...defs_1.OK };
44
+ },
45
+ },
46
+ };
47
+ }
48
+ };
49
+ exports.default = DomainStorage;
50
+ //# sourceMapping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,EAAE;oBACjC,OAAO,SAAE,CAAC;gBACZ,CAAC;gBACD,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAU,EAAE,CAAS,EAAE,SAA2B,EAAE,EAAE;oBACxE,SAAS,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;oBACxC,OAAO,EAAE,GAAG,SAAE,EAAE,CAAC;gBACnB,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CAAA,CAAC;AAEF,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=domain-storage.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-storage.test.d.ts","sourceRoot":"","sources":["../src/domain-storage.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const domain_storage_1 = __importDefault(require("./domain-storage"));
7
+ describe('domain storage', () => {
8
+ it('exists', async () => {
9
+ expect(domain_storage_1.default).toBeDefined();
10
+ });
11
+ });
12
+ //# sourceMappingURL=domain-storage.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-storage.test.js","sourceRoot":"","sources":["../src/domain-storage.test.ts"],"names":[],"mappings":";;;;;AAAA,sEAA6C;AAE7C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QACtB,MAAM,CAAC,wBAAa,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@haibun/domain-storage",
3
+ "version": "1.5.0",
4
+ "description": "",
5
+ "author": "",
6
+ "main": "build/domain-storage.js",
7
+ "files": [
8
+ "build/**"
9
+ ],
10
+ "devDependencies": {
11
+ "@types/jest": "^26.0.19",
12
+ "@types/node": "^15.0.1",
13
+ "@typescript-eslint/eslint-plugin": "^4.13.0",
14
+ "@typescript-eslint/parser": "^4.13.0",
15
+ "eslint": "^7.2.0",
16
+ "eslint-config-airbnb-typescript": "^12.0.0",
17
+ "eslint-config-prettier": "^8.3.0",
18
+ "eslint-plugin-import": "^2.22.1",
19
+ "eslint-plugin-prefer-arrow": "^1.2.2",
20
+ "eslint-plugin-prettier": "^3.3.1",
21
+ "jest": "^27.0.4",
22
+ "prettier": "^2.3.1",
23
+ "ts-node": "^10.0.0",
24
+ "tslint": "^6.1.3"
25
+ },
26
+ "scripts": {
27
+ "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
28
+ "lint": "eslint -c .eslintrc.json --ext .ts,.js src",
29
+ "test": "jest --config jest.config.ts",
30
+ "test-haibun": "build/cli.js test/projects/web",
31
+ "coverage": "jest --config jest.config.ts --coverage",
32
+ "test-watch": "jest --watch",
33
+ "build": "tsc -b .",
34
+ "tsc-watch": "tsc --watch",
35
+ "tsc": "tsc",
36
+ "xprepare": "npm run build",
37
+ "prepublishOnly": "tsc -b .",
38
+ "preversion": "npm run lint",
39
+ "version": "npm run format && git add -A src"
40
+ },
41
+ "dependencies": {
42
+ "ts-jest": "^27.1.3"
43
+ }
44
+ }