@neurodevs/meta-node 0.12.3 → 0.13.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,7 @@
1
+ import AbstractSpruceTest from '@sprucelabs/test-utils';
2
+ export default class TypescriptClassSnippetSuiteTest extends AbstractSpruceTest {
3
+ private static instance;
4
+ protected static beforeEach(): Promise<void>;
5
+ protected static createsInstance(): Promise<void>;
6
+ private static TypescriptClassSnippetSuite;
7
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __importDefault = (this && this.__importDefault) || function (mod) {
42
+ return (mod && mod.__esModule) ? mod : { "default": mod };
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ const test_utils_1 = __importStar(require("@sprucelabs/test-utils"));
46
+ const TypescriptClassSnippetSuite_1 = __importDefault(require("../../impl/TypescriptClassSnippetSuite"));
47
+ class TypescriptClassSnippetSuiteTest extends test_utils_1.default {
48
+ static async beforeEach() {
49
+ await super.beforeEach();
50
+ this.instance = this.TypescriptClassSnippetSuite();
51
+ }
52
+ static async createsInstance() {
53
+ test_utils_1.assert.isTruthy(this.instance, 'Failed to create instance!');
54
+ }
55
+ static TypescriptClassSnippetSuite() {
56
+ return TypescriptClassSnippetSuite_1.default.Create();
57
+ }
58
+ }
59
+ exports.default = TypescriptClassSnippetSuiteTest;
60
+ __decorate([
61
+ (0, test_utils_1.test)()
62
+ ], TypescriptClassSnippetSuiteTest, "createsInstance", null);
63
+ //# sourceMappingURL=TypescriptClassSnippetSuite.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypescriptClassSnippetSuite.test.js","sourceRoot":"","sources":["../../../src/__tests__/impl/TypescriptClassSnippetSuite.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAAyE;AACzE,yGAE+C;AAE/C,MAAqB,+BAAgC,SAAQ,oBAAkB;IAGjE,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;QAExB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,EAAE,CAAA;IACtD,CAAC;IAGsB,AAAb,MAAM,CAAC,KAAK,CAAC,eAAe;QAClC,mBAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAA;IAChE,CAAC;IAEO,MAAM,CAAC,2BAA2B;QACtC,OAAO,qCAA2B,CAAC,MAAM,EAAE,CAAA;IAC/C,CAAC;CACJ;AAjBD,kDAiBC;AAP0B;IADtB,IAAA,iBAAI,GAAE;4DAGN"}
@@ -0,0 +1,8 @@
1
+ export default class TypescriptClassSnippetSuite implements SnippetSuite {
2
+ static Class?: SnippetSuiteConstructor;
3
+ protected constructor();
4
+ static Create(): TypescriptClassSnippetSuite;
5
+ }
6
+ export interface SnippetSuite {
7
+ }
8
+ export type SnippetSuiteConstructor = new () => SnippetSuite;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class TypescriptClassSnippetSuite {
4
+ constructor() { }
5
+ static Create() {
6
+ return new (this.Class ?? this)();
7
+ }
8
+ }
9
+ exports.default = TypescriptClassSnippetSuite;
10
+ //# sourceMappingURL=TypescriptClassSnippetSuite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypescriptClassSnippetSuite.js","sourceRoot":"","sources":["../../src/impl/TypescriptClassSnippetSuite.ts"],"names":[],"mappings":";;AAAA,MAAqB,2BAA2B;IAG5C,gBAAyB,CAAC;IAEnB,MAAM,CAAC,MAAM;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAA;IACrC,CAAC;CACJ;AARD,8CAQC"}
package/build/index.d.ts CHANGED
@@ -22,3 +22,7 @@ export { default as VscodeSnippetKeybinder } from './impl/VscodeSnippetKeybinder
22
22
  export * from './impl/VscodeSnippetKeybinder';
23
23
  export { default as FakeSnippetKeybinder } from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder';
24
24
  export * from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder';
25
+ export { default as TypescriptClassSnippetSuite } from './impl/TypescriptClassSnippetSuite';
26
+ export * from './impl/TypescriptClassSnippetSuite';
27
+ export { default as FakeSnippetSuite } from './testDoubles/SnippetSuite/FakeSnippetSuite';
28
+ export * from './testDoubles/SnippetSuite/FakeSnippetSuite';
package/build/index.js CHANGED
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.FakeSnippetKeybinder = exports.VscodeSnippetKeybinder = exports.FakeAutopackage = exports.NpmAutopackage = exports.FakeAutomodule = exports.UiAutomodule = exports.ImplAutomodule = exports.AbstractAutomodule = exports.FakeAutodocumenter = exports.PackageAutodocumenter = exports.FakeAutocloner = exports.GitAutocloner = void 0;
21
+ exports.FakeSnippetSuite = exports.TypescriptClassSnippetSuite = exports.FakeSnippetKeybinder = exports.VscodeSnippetKeybinder = exports.FakeAutopackage = exports.NpmAutopackage = exports.FakeAutomodule = exports.UiAutomodule = exports.ImplAutomodule = exports.AbstractAutomodule = exports.FakeAutodocumenter = exports.PackageAutodocumenter = exports.FakeAutocloner = exports.GitAutocloner = void 0;
22
22
  var GitAutocloner_1 = require("./impl/GitAutocloner");
23
23
  Object.defineProperty(exports, "GitAutocloner", { enumerable: true, get: function () { return __importDefault(GitAutocloner_1).default; } });
24
24
  __exportStar(require("./impl/GitAutocloner"), exports);
@@ -59,4 +59,11 @@ __exportStar(require("./impl/VscodeSnippetKeybinder"), exports);
59
59
  var FakeSnippetKeybinder_1 = require("./testDoubles/SnippetKeybinder/FakeSnippetKeybinder");
60
60
  Object.defineProperty(exports, "FakeSnippetKeybinder", { enumerable: true, get: function () { return __importDefault(FakeSnippetKeybinder_1).default; } });
61
61
  __exportStar(require("./testDoubles/SnippetKeybinder/FakeSnippetKeybinder"), exports);
62
+ // SnippetSuite
63
+ var TypescriptClassSnippetSuite_1 = require("./impl/TypescriptClassSnippetSuite");
64
+ Object.defineProperty(exports, "TypescriptClassSnippetSuite", { enumerable: true, get: function () { return __importDefault(TypescriptClassSnippetSuite_1).default; } });
65
+ __exportStar(require("./impl/TypescriptClassSnippetSuite"), exports);
66
+ var FakeSnippetSuite_1 = require("./testDoubles/SnippetSuite/FakeSnippetSuite");
67
+ Object.defineProperty(exports, "FakeSnippetSuite", { enumerable: true, get: function () { return __importDefault(FakeSnippetSuite_1).default; } });
68
+ __exportStar(require("./testDoubles/SnippetSuite/FakeSnippetSuite"), exports);
62
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,aAAa;;;;;;;;;;;;;;;;;;;;AAEb,sDAA+D;AAAtD,+HAAA,OAAO,OAAiB;AACjC,uDAAoC;AAEpC,0EAAmF;AAA1E,iIAAA,OAAO,OAAkB;AAClC,0EAAuD;AAEvD,iBAAiB;AAEjB,sEAA+E;AAAtE,+IAAA,OAAO,OAAyB;AACzC,+DAA4C;AAE5C,sFAA+F;AAAtF,yIAAA,OAAO,OAAsB;AACtC,kFAA+D;AAE/D,aAAa;AAEb,gEAAyE;AAAhE,yIAAA,OAAO,OAAsB;AACtC,4DAAyC;AAEzC,wDAAiE;AAAxD,iIAAA,OAAO,OAAkB;AAClC,wDAAqC;AAErC,oDAA6D;AAApD,6HAAA,OAAO,OAAgB;AAChC,sDAAmC;AAEnC,0EAAmF;AAA1E,iIAAA,OAAO,OAAkB;AAClC,0EAAuD;AAEvD,cAAc;AAEd,wDAAiE;AAAxD,iIAAA,OAAO,OAAkB;AAClC,wDAAqC;AAErC,6EAAsF;AAA7E,mIAAA,OAAO,OAAmB;AACnC,4EAAyD;AAEzD,mBAAmB;AAEnB,wEAAiF;AAAxE,iJAAA,OAAO,OAA0B;AAC1C,gEAA6C;AAE7C,4FAAqG;AAA5F,6IAAA,OAAO,OAAwB;AACxC,sFAAmE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,aAAa;;;;;;;;;;;;;;;;;;;;AAEb,sDAA+D;AAAtD,+HAAA,OAAO,OAAiB;AACjC,uDAAoC;AAEpC,0EAAmF;AAA1E,iIAAA,OAAO,OAAkB;AAClC,0EAAuD;AAEvD,iBAAiB;AAEjB,sEAA+E;AAAtE,+IAAA,OAAO,OAAyB;AACzC,+DAA4C;AAE5C,sFAA+F;AAAtF,yIAAA,OAAO,OAAsB;AACtC,kFAA+D;AAE/D,aAAa;AAEb,gEAAyE;AAAhE,yIAAA,OAAO,OAAsB;AACtC,4DAAyC;AAEzC,wDAAiE;AAAxD,iIAAA,OAAO,OAAkB;AAClC,wDAAqC;AAErC,oDAA6D;AAApD,6HAAA,OAAO,OAAgB;AAChC,sDAAmC;AAEnC,0EAAmF;AAA1E,iIAAA,OAAO,OAAkB;AAClC,0EAAuD;AAEvD,cAAc;AAEd,wDAAiE;AAAxD,iIAAA,OAAO,OAAkB;AAClC,wDAAqC;AAErC,6EAAsF;AAA7E,mIAAA,OAAO,OAAmB;AACnC,4EAAyD;AAEzD,mBAAmB;AAEnB,wEAAiF;AAAxE,iJAAA,OAAO,OAA0B;AAC1C,gEAA6C;AAE7C,4FAAqG;AAA5F,6IAAA,OAAO,OAAwB;AACxC,sFAAmE;AAEnE,eAAe;AAEf,kFAA2F;AAAlF,2JAAA,OAAO,OAA+B;AAC/C,qEAAkD;AAElD,gFAAyF;AAAhF,qIAAA,OAAO,OAAoB;AACpC,8EAA2D"}
@@ -0,0 +1,6 @@
1
+ import { SnippetSuite } from '../../impl/TypescriptClassSnippetSuite';
2
+ export default class FakeSnippetSuite implements SnippetSuite {
3
+ static numCallsToConstructor: number;
4
+ constructor();
5
+ static resetTestDouble(): void;
6
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class FakeSnippetSuite {
4
+ constructor() {
5
+ FakeSnippetSuite.numCallsToConstructor++;
6
+ }
7
+ static resetTestDouble() {
8
+ FakeSnippetSuite.numCallsToConstructor = 0;
9
+ }
10
+ }
11
+ FakeSnippetSuite.numCallsToConstructor = 0;
12
+ exports.default = FakeSnippetSuite;
13
+ //# sourceMappingURL=FakeSnippetSuite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FakeSnippetSuite.js","sourceRoot":"","sources":["../../../src/testDoubles/SnippetSuite/FakeSnippetSuite.ts"],"names":[],"mappings":";;AAEA,MAAqB,gBAAgB;IAGjC;QACI,gBAAgB,CAAC,qBAAqB,EAAE,CAAA;IAC5C,CAAC;IAEM,MAAM,CAAC,eAAe;QACzB,gBAAgB,CAAC,qBAAqB,GAAG,CAAC,CAAA;IAC9C,CAAC;;AARa,sCAAqB,GAAG,CAAC,CAAA;kBADtB,gBAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neurodevs/meta-node",
3
- "version": "0.12.3",
3
+ "version": "0.13.0",
4
4
  "description": "Meta-layer utilities for maintaining Node.js package ecosystems.",
5
5
  "keywords": [
6
6
  "nodejs",
@@ -0,0 +1,23 @@
1
+ import AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils'
2
+ import TypescriptClassSnippetSuite, {
3
+ SnippetSuite,
4
+ } from '../../impl/TypescriptClassSnippetSuite'
5
+
6
+ export default class TypescriptClassSnippetSuiteTest extends AbstractSpruceTest {
7
+ private static instance: SnippetSuite
8
+
9
+ protected static async beforeEach() {
10
+ await super.beforeEach()
11
+
12
+ this.instance = this.TypescriptClassSnippetSuite()
13
+ }
14
+
15
+ @test()
16
+ protected static async createsInstance() {
17
+ assert.isTruthy(this.instance, 'Failed to create instance!')
18
+ }
19
+
20
+ private static TypescriptClassSnippetSuite() {
21
+ return TypescriptClassSnippetSuite.Create()
22
+ }
23
+ }
@@ -0,0 +1,13 @@
1
+ export default class TypescriptClassSnippetSuite implements SnippetSuite {
2
+ public static Class?: SnippetSuiteConstructor
3
+
4
+ protected constructor() {}
5
+
6
+ public static Create() {
7
+ return new (this.Class ?? this)()
8
+ }
9
+ }
10
+
11
+ export interface SnippetSuite {}
12
+
13
+ export type SnippetSuiteConstructor = new () => SnippetSuite
package/src/index.ts CHANGED
@@ -43,3 +43,11 @@ export * from './impl/VscodeSnippetKeybinder'
43
43
 
44
44
  export { default as FakeSnippetKeybinder } from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder'
45
45
  export * from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder'
46
+
47
+ // SnippetSuite
48
+
49
+ export { default as TypescriptClassSnippetSuite } from './impl/TypescriptClassSnippetSuite'
50
+ export * from './impl/TypescriptClassSnippetSuite'
51
+
52
+ export { default as FakeSnippetSuite } from './testDoubles/SnippetSuite/FakeSnippetSuite'
53
+ export * from './testDoubles/SnippetSuite/FakeSnippetSuite'
@@ -0,0 +1,13 @@
1
+ import { SnippetSuite } from '../../impl/TypescriptClassSnippetSuite'
2
+
3
+ export default class FakeSnippetSuite implements SnippetSuite {
4
+ public static numCallsToConstructor = 0
5
+
6
+ public constructor() {
7
+ FakeSnippetSuite.numCallsToConstructor++
8
+ }
9
+
10
+ public static resetTestDouble() {
11
+ FakeSnippetSuite.numCallsToConstructor = 0
12
+ }
13
+ }