@sprucelabs/spruce-cli 23.1.0 → 24.1.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +21 -0
  3. package/build/__tests__/behavioral/DeployingToSandbox.test.d.ts +6 -1
  4. package/build/__tests__/behavioral/DeployingToSandbox.test.js +54 -35
  5. package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
  6. package/build/__tests__/behavioral/conversations/CreatingAConversationTopic.test.js +2 -2
  7. package/build/__tests__/behavioral/conversations/CreatingAConversationTopic.test.js.map +1 -1
  8. package/build/__tests__/behavioral/conversations/RegisteringConversationsOnBoot.test.js +1 -1
  9. package/build/__tests__/behavioral/conversations/RegisteringConversationsOnBoot.test.js.map +1 -1
  10. package/build/__tests__/behavioral/conversations/TestingAConversation.test.js +5 -5
  11. package/build/__tests__/behavioral/conversations/TestingAConversation.test.js.map +1 -1
  12. package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
  13. package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js +1 -1
  14. package/build/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.js.map +1 -1
  15. package/build/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.d.ts +11 -0
  16. package/build/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.js +49 -0
  17. package/build/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.js.map +1 -0
  18. package/build/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.d.ts +5 -0
  19. package/build/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.js +34 -0
  20. package/build/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.js.map +1 -0
  21. package/build/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.d.ts +12 -0
  22. package/build/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.js +88 -0
  23. package/build/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.js.map +1 -0
  24. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.d.ts +13 -0
  25. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.js +109 -0
  26. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.js.map +1 -0
  27. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.d.ts +4 -0
  28. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.js +29 -0
  29. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.js.map +1 -0
  30. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.d.ts +26 -0
  31. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.js +259 -0
  32. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.js.map +1 -0
  33. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.d.ts +26 -0
  34. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.js +202 -0
  35. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.js.map +1 -0
  36. package/build/__tests__/behavioral/tests/migrationToInstance/support/AbstractInstanceTest.txt +24 -0
  37. package/build/__tests__/behavioral/tests/migrationToInstance/support/AbstractStaticTest.txt +24 -0
  38. package/build/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest.txt +36 -0
  39. package/build/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest2.txt +63 -0
  40. package/build/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest3.txt +222 -0
  41. package/build/__tests__/behavioral/tests/migrationToInstance/support/StaticTest.txt +34 -0
  42. package/build/__tests__/behavioral/tests/migrationToInstance/support/StaticTest2.txt +62 -0
  43. package/build/__tests__/behavioral/tests/migrationToInstance/support/StaticTest3.txt +221 -0
  44. package/build/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.d.ts +2 -0
  45. package/build/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.js +51 -0
  46. package/build/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.js.map +1 -0
  47. package/build/__tests__/behavioral/versions/ResolvingVersions.test.js +0 -3
  48. package/build/__tests__/behavioral/versions/ResolvingVersions.test.js.map +1 -1
  49. package/build/__tests__/implementation/OrganizationStore.test.js +2 -2
  50. package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
  51. package/build/__tests__/implementation/TerminalInterface.test.d.ts +1 -0
  52. package/build/__tests__/implementation/TerminalInterface.test.js +6 -0
  53. package/build/__tests__/implementation/TerminalInterface.test.js.map +1 -1
  54. package/build/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/AnotherStaticTest.test.ts +33 -0
  55. package/build/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/ShouldBeIgnored.ts +0 -0
  56. package/build/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/StaticTest1.test.ts +33 -0
  57. package/build/__tests__/testDirsAndFiles/static_test_migration_2/src/DoNotInclude.ts +0 -0
  58. package/build/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AStaticTest.test.ts +33 -0
  59. package/build/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AnotherStaticTest1.test.ts +33 -0
  60. package/build/__tests__/testDirsAndFiles/static_test_migration_3/NotAFileThatShouldBeMigrated.ts +0 -0
  61. package/build/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AStaticTest2.test.ts +17 -0
  62. package/build/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AbstractWhateverTest.ts +3 -0
  63. package/build/errors/SpruceError.js +1 -1
  64. package/build/errors/SpruceError.js.map +1 -1
  65. package/build/features/skill/actions/LoginAction.js +1 -2
  66. package/build/features/skill/actions/LoginAction.js.map +1 -1
  67. package/build/features/test/actions/CreateAction.d.ts +1 -0
  68. package/build/features/test/actions/CreateAction.js +13 -0
  69. package/build/features/test/actions/CreateAction.js.map +1 -1
  70. package/build/features/test/actions/MigrateAction.d.ts +17 -0
  71. package/build/features/test/actions/MigrateAction.js +39 -0
  72. package/build/features/test/actions/MigrateAction.js.map +1 -0
  73. package/build/index.js +0 -0
  74. package/build/tests/staticToInstanceMigration/StaticTestFinder.d.ts +8 -0
  75. package/build/tests/staticToInstanceMigration/StaticTestFinder.js +23 -0
  76. package/build/tests/staticToInstanceMigration/StaticTestFinder.js.map +1 -0
  77. package/build/tests/staticToInstanceMigration/StaticToInstanceMigrator.d.ts +58 -0
  78. package/build/tests/staticToInstanceMigration/StaticToInstanceMigrator.js +48 -0
  79. package/build/tests/staticToInstanceMigration/StaticToInstanceMigrator.js.map +1 -0
  80. package/build/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.d.ts +12 -0
  81. package/build/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.js +138 -0
  82. package/build/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.js.map +1 -0
  83. package/build/utilities/isCi.js +1 -1
  84. package/build/utilities/isCi.js.map +1 -1
  85. package/package.json +28 -45
  86. package/src/__tests__/behavioral/DeployingToSandbox.test.ts +77 -44
  87. package/src/__tests__/behavioral/conversations/CreatingAConversationTopic.test.ts +2 -2
  88. package/src/__tests__/behavioral/conversations/RegisteringConversationsOnBoot.test.ts +1 -1
  89. package/src/__tests__/behavioral/conversations/TestingAConversation.test.ts +5 -5
  90. package/src/__tests__/behavioral/organization/CreatingAnOrg.test.ts +0 -1
  91. package/src/__tests__/behavioral/schemas/CreatingSchemasWithGenerics.test.ts +2 -1
  92. package/src/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.ts +77 -0
  93. package/src/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.ts +19 -0
  94. package/src/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.ts +99 -0
  95. package/src/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.ts +72 -0
  96. package/src/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.ts +31 -0
  97. package/src/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.ts +252 -0
  98. package/src/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.ts +193 -0
  99. package/src/__tests__/behavioral/tests/migrationToInstance/support/AbstractInstanceTest.txt +24 -0
  100. package/src/__tests__/behavioral/tests/migrationToInstance/support/AbstractStaticTest.txt +24 -0
  101. package/src/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest.txt +36 -0
  102. package/src/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest2.txt +63 -0
  103. package/src/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest3.txt +222 -0
  104. package/src/__tests__/behavioral/tests/migrationToInstance/support/StaticTest.txt +34 -0
  105. package/src/__tests__/behavioral/tests/migrationToInstance/support/StaticTest2.txt +62 -0
  106. package/src/__tests__/behavioral/tests/migrationToInstance/support/StaticTest3.txt +221 -0
  107. package/src/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.ts +50 -0
  108. package/src/__tests__/behavioral/versions/ResolvingVersions.test.ts +1 -3
  109. package/src/__tests__/implementation/OrganizationStore.test.ts +6 -2
  110. package/src/__tests__/implementation/TerminalInterface.test.ts +9 -0
  111. package/src/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/AnotherStaticTest.test.ts +33 -0
  112. package/src/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/ShouldBeIgnored.ts +0 -0
  113. package/src/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/StaticTest1.test.ts +33 -0
  114. package/src/__tests__/testDirsAndFiles/static_test_migration_2/src/DoNotInclude.ts +0 -0
  115. package/src/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AStaticTest.test.ts +33 -0
  116. package/src/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AnotherStaticTest1.test.ts +33 -0
  117. package/src/__tests__/testDirsAndFiles/static_test_migration_3/NotAFileThatShouldBeMigrated.ts +0 -0
  118. package/src/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AStaticTest2.test.ts +17 -0
  119. package/src/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AbstractWhateverTest.ts +3 -0
  120. package/src/errors/SpruceError.ts +1 -1
  121. package/src/features/skill/actions/LoginAction.ts +8 -7
  122. package/src/features/test/actions/CreateAction.ts +17 -0
  123. package/src/features/test/actions/MigrateAction.ts +41 -0
  124. package/src/tests/staticToInstanceMigration/StaticTestFinder.ts +25 -0
  125. package/src/tests/staticToInstanceMigration/StaticToInstanceMigrator.ts +73 -0
  126. package/src/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.ts +197 -0
  127. package/src/utilities/isCi.ts +1 -1
  128. package/.DS_Store +0 -0
  129. package/.env +0 -25
  130. package/.env-dev +0 -24
  131. package/.eslintcache +0 -1
  132. package/dist/spruce-darwin-arm64 +0 -0
  133. package/dist/spruce-linux-arm64 +0 -0
  134. package/junit.xml +0 -42
  135. package/yarn-error.log +0 -597
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = __importDefault(require("path"));
7
+ const globby_1 = __importDefault(require("@sprucelabs/globby"));
7
8
  const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
8
9
  const spruce_skill_utils_2 = require("@sprucelabs/spruce-skill-utils");
9
10
  const createTestOptions_schema_1 = __importDefault(require("./../../../.spruce/schemas/spruceCli/v2020_07_22/createTestOptions.schema"));
@@ -29,6 +30,7 @@ class CreateAction extends AbstractAction_1.default {
29
30
  this.ui.startLoading('Generating test file...');
30
31
  const writer = this.Writer('test');
31
32
  const isTestFixturesInstalled = !!this.Service('pkg').get('devDependencies.@sprucelabs/spruce-test-fixtures');
33
+ let doesStaticTestExist = await this.doesStaticTestAlreadyExist(resolvedDestination);
32
34
  const results = await writer.writeTest(resolvedDestination, {
33
35
  ...normalizedOptions,
34
36
  type,
@@ -36,12 +38,23 @@ class CreateAction extends AbstractAction_1.default {
36
38
  parentTestClass,
37
39
  isTestFixturesInstalled,
38
40
  namePascal: namePascal ?? spruce_skill_utils_1.namesUtil.toPascal(nameCamel),
41
+ testType: doesStaticTestExist ? 'static' : 'instance',
39
42
  });
40
43
  return {
41
44
  files: results,
42
45
  hints: ["run `spruce test` in your skill when you're ready!"],
43
46
  };
44
47
  }
48
+ async doesStaticTestAlreadyExist(resolvedDestination) {
49
+ const matches = await (0, globby_1.default)(resolvedDestination + `/**/*.test.ts`);
50
+ let doesStaticTestExist = false;
51
+ const match = matches[0];
52
+ if (match) {
53
+ const contents = spruce_skill_utils_2.diskUtil.readFile(matches[0]);
54
+ doesStaticTestExist = contents.includes('static');
55
+ }
56
+ return doesStaticTestExist;
57
+ }
45
58
  async promptForSubDir(resolvedDestination) {
46
59
  const match = await this.ui.prompt({
47
60
  type: 'directory',
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAction.js","sourceRoot":"","sources":["../../../../src/features/test/actions/CreateAction.ts"],"names":[],"mappings":";;;;;AAAA,gDAA2B;AAC3B,uEAA0D;AAC1D,uEAAyD;AAEzD,8HAAmG;AACnG,0EAAiD;AAIjD,MAAqB,YAAa,SAAQ,wBAA6B;IAC5D,aAAa,GAAG,kCAAsB,CAAA;IACtC,iBAAiB,GAAG,uBAAuB,CAAA;IAE3C,KAAK,CAAC,OAAO,CAAC,OAAgB;QACjC,MAAM,iBAAiB,GAAG,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAA;QACnE,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,GACrD,iBAAiB,CAAA;QAErB,IAAI,mBAAmB,GAAG,6BAAQ,CAAC,WAAW,CAC1C,IAAI,CA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,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,UAAU,EACN,KAAK,CAAC,MAAM;gBACZ,6BAAQ,CAAC,mBAAmB,CACxB,mBAAmB;gBACnB,YAAY;gBACZ,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,cAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CACvD;SACR,CAAA;IACL,CAAC;CACJ;AA1KD,+BA0KC"}
@@ -0,0 +1,17 @@
1
+ import AbstractAction from '../../AbstractAction';
2
+ import { FeatureActionResponse } from '../../features.types';
3
+ export default class MigrationAction extends AbstractAction<OptionsSchema> {
4
+ optionsSchema: {
5
+ id: string;
6
+ fields: {};
7
+ };
8
+ commandAliases: string[];
9
+ invocationMessage: string;
10
+ execute(): Promise<FeatureActionResponse>;
11
+ }
12
+ declare const optionsSchema: {
13
+ id: string;
14
+ fields: {};
15
+ };
16
+ type OptionsSchema = typeof optionsSchema;
17
+ export {};
@@ -0,0 +1,39 @@
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 schema_1 = require("@sprucelabs/schema");
7
+ const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
8
+ const StaticTestFinder_1 = __importDefault(require("../../../tests/staticToInstanceMigration/StaticTestFinder"));
9
+ const StaticToInstanceMigrator_1 = __importDefault(require("../../../tests/staticToInstanceMigration/StaticToInstanceMigrator"));
10
+ const StaticToInstanceTestFileMigrator_1 = __importDefault(require("../../../tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator"));
11
+ const AbstractAction_1 = __importDefault(require("../../AbstractAction"));
12
+ class MigrationAction extends AbstractAction_1.default {
13
+ optionsSchema = optionsSchema;
14
+ commandAliases = ['migrate.tests'];
15
+ invocationMessage = 'Migrating tests from static to instance... 🌲';
16
+ async execute() {
17
+ const testFinder = StaticTestFinder_1.default.Finder();
18
+ const testFileMigrator = StaticToInstanceTestFileMigrator_1.default.Migrator();
19
+ const migrator = StaticToInstanceMigrator_1.default.Migrator({
20
+ testFinder,
21
+ testFileMigrator,
22
+ });
23
+ const path = spruce_skill_utils_1.diskUtil.resolvePath(this.cwd, 'src', '__tests__');
24
+ const { totalTestsSkipped, totalTestsUpdated } = await migrator.run(path);
25
+ return {
26
+ headline: 'Migrated tests from static to instance based.',
27
+ summaryLines: [
28
+ `${totalTestsUpdated} test${totalTestsUpdated === 1 ? '' : 's'} updated`,
29
+ `${totalTestsSkipped} test${totalTestsSkipped === 1 ? '' : 's'} skipped`,
30
+ ],
31
+ };
32
+ }
33
+ }
34
+ exports.default = MigrationAction;
35
+ const optionsSchema = (0, schema_1.buildSchema)({
36
+ id: 'migrateTests',
37
+ fields: {},
38
+ });
39
+ //# sourceMappingURL=MigrateAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrateAction.js","sourceRoot":"","sources":["../../../../src/features/test/actions/MigrateAction.ts"],"names":[],"mappings":";;;;;AAAA,+CAAgD;AAChD,uEAAyD;AACzD,iHAA4F;AAC5F,iIAA4G;AAC5G,iJAA4H;AAC5H,0EAAiD;AAGjD,MAAqB,eAAgB,SAAQ,wBAA6B;IAC/D,aAAa,GAAG,aAAa,CAAA;IAC7B,cAAc,GAAG,CAAC,eAAe,CAAC,CAAA;IAClC,iBAAiB,GAAG,+CAA+C,CAAA;IAEnE,KAAK,CAAC,OAAO;QAChB,MAAM,UAAU,GAAG,0BAAoB,CAAC,MAAM,EAAE,CAAA;QAChD,MAAM,gBAAgB,GAAG,0CAAoC,CAAC,QAAQ,EAAE,CAAA;QACxE,MAAM,QAAQ,GAAG,kCAA4B,CAAC,QAAQ,CAAC;YACnD,UAAU;YACV,gBAAgB;SACnB,CAAC,CAAA;QAEF,MAAM,IAAI,GAAG,6BAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA;QAC/D,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAC1C,MAAM,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAE5B,OAAO;YACH,QAAQ,EAAE,+CAA+C;YACzD,YAAY,EAAE;gBACV,GAAG,iBAAiB,QAAQ,iBAAiB,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU;gBACxE,GAAG,iBAAiB,QAAQ,iBAAiB,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU;aAC3E;SACJ,CAAA;IACL,CAAC;CACJ;AAzBD,kCAyBC;AAED,MAAM,aAAa,GAAG,IAAA,oBAAW,EAAC;IAC9B,EAAE,EAAE,cAAc;IAClB,MAAM,EAAE,EAAE;CACb,CAAC,CAAA"}
package/build/index.js CHANGED
File without changes
@@ -0,0 +1,8 @@
1
+ export default class StaticTestFinderImpl implements StaticTestFinder {
2
+ static Class?: new () => StaticTestFinder;
3
+ static Finder(): StaticTestFinder;
4
+ find(lookupDir: string): Promise<string[]>;
5
+ }
6
+ export interface StaticTestFinder {
7
+ find(lookupDir: string): Promise<string[]>;
8
+ }
@@ -0,0 +1,23 @@
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 globby_1 = __importDefault(require("@sprucelabs/globby"));
7
+ const schema_1 = require("@sprucelabs/schema");
8
+ class StaticTestFinderImpl {
9
+ static Class;
10
+ static Finder() {
11
+ return new (this.Class ?? this)();
12
+ }
13
+ async find(lookupDir) {
14
+ (0, schema_1.assertOptions)({ lookupDir }, ['lookupDir']);
15
+ const matches = await (0, globby_1.default)([
16
+ `${lookupDir}/**/Abstract*Test.ts`,
17
+ `${lookupDir}/**/*.test.ts`,
18
+ ]);
19
+ return matches;
20
+ }
21
+ }
22
+ exports.default = StaticTestFinderImpl;
23
+ //# sourceMappingURL=StaticTestFinder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticTestFinder.js","sourceRoot":"","sources":["../../../src/tests/staticToInstanceMigration/StaticTestFinder.ts"],"names":[],"mappings":";;;;;AAAA,gEAAuC;AACvC,+CAAkD;AAElD,MAAqB,oBAAoB;IAC9B,MAAM,CAAC,KAAK,CAA6B;IAEzC,MAAM,CAAC,MAAM;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAA;IACrC,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,SAAiB;QAC/B,IAAA,sBAAa,EAAC,EAAE,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;QAE3C,MAAM,OAAO,GAAG,MAAM,IAAA,gBAAM,EAAC;YACzB,GAAG,SAAS,sBAAsB;YAClC,GAAG,SAAS,eAAe;SAC9B,CAAC,CAAA;QAEF,OAAO,OAAO,CAAA;IAClB,CAAC;CACJ;AAjBD,uCAiBC"}
@@ -0,0 +1,58 @@
1
+ import StaticTestFinder from './StaticTestFinder';
2
+ import { StaticToInstanceTestFileMigrator } from './StaticToInstanceTestFileMigrator';
3
+ export default class StaticToInstanceMigratorImpl implements StaticToInstanceMigrator {
4
+ static diskUtil: {
5
+ writeFile(destination: string, contents: string): void;
6
+ readDir(destination: string): string[];
7
+ readFile(source: string): string;
8
+ deleteFile(destination: string): void;
9
+ createDir(destination: string): void;
10
+ moveDir(source: string, destination: string): void;
11
+ moveFile(source: string, destination: string): void;
12
+ copyDir(source: string, destination: string): Promise<unknown>;
13
+ deleteDir(target: string): void;
14
+ doesFileExist(target: string): boolean;
15
+ isDir(target: string): boolean;
16
+ isDirPath(path: string): boolean;
17
+ isFile(target: string): boolean;
18
+ doesDirExist(target: string): boolean;
19
+ resolveHashSprucePath(cwd: string, ...filePath: string[]): string;
20
+ doesHashSprucePathExist(cwd: string, ...filePath: string[]): boolean;
21
+ resolveBuiltHashSprucePath(cwd: string, ...filePath: string[]): string;
22
+ doesBuiltHashSprucePathExist(cwd: string, ...filePath: string[]): boolean;
23
+ isFileDifferent(destination: string, contents: string): boolean;
24
+ deleteEmptyDirs(dir: string): void;
25
+ resolvePath(cwd: string, ...filePath: string[]): string;
26
+ resolveRelativePath(path1: string, path2: string): string;
27
+ resolveFile(...pathItems: string[]): string | false;
28
+ createTempDir(...files: string[]): string;
29
+ createRandomTempDir(): string;
30
+ hasFileChanged(...filePath: string[]): boolean;
31
+ markFileAsUnchanged(...filePath: string[]): void;
32
+ resolveCacheDirForDir(dir: string): string;
33
+ resolveFileInHashSpruceDir(cwd: string, ...filePath: string[]): string;
34
+ getFileChangedCacheFile(file: string): string;
35
+ };
36
+ static Class?: new (options: StaticToInstanceMigratorOptions) => StaticToInstanceMigrator;
37
+ private testFinder;
38
+ private testFileMigrator;
39
+ protected constructor(options: StaticToInstanceMigratorOptions);
40
+ static Migrator(options: StaticToInstanceMigratorOptions): StaticToInstanceMigrator;
41
+ run(lookupDir: string): Promise<{
42
+ totalTestsUpdated: number;
43
+ totalTestsSkipped: number;
44
+ }>;
45
+ private readFile;
46
+ private writeFile;
47
+ }
48
+ export interface StaticToInstanceMigratorOptions {
49
+ testFinder: StaticTestFinder;
50
+ testFileMigrator: StaticToInstanceTestFileMigrator;
51
+ }
52
+ export interface StaticToInstanceMigratorResults {
53
+ totalTestsUpdated: number;
54
+ totalTestsSkipped: number;
55
+ }
56
+ export interface StaticToInstanceMigrator {
57
+ run(lookupDir: string): Promise<StaticToInstanceMigratorResults>;
58
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schema_1 = require("@sprucelabs/schema");
4
+ const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
5
+ class StaticToInstanceMigratorImpl {
6
+ static diskUtil = spruce_skill_utils_1.diskUtil;
7
+ static Class;
8
+ testFinder;
9
+ testFileMigrator;
10
+ constructor(options) {
11
+ const { testFinder, testFileMigrator } = options;
12
+ this.testFinder = testFinder;
13
+ this.testFileMigrator = testFileMigrator;
14
+ }
15
+ static Migrator(options) {
16
+ (0, schema_1.assertOptions)(options, ['testFinder', 'testFileMigrator']);
17
+ return new (this.Class ?? this)(options);
18
+ }
19
+ async run(lookupDir) {
20
+ (0, schema_1.assertOptions)({ lookupDir }, ['lookupDir']);
21
+ const matches = await this.testFinder.find(lookupDir);
22
+ let totalTestsUpdated = 0;
23
+ let totalTestsSkipped = 0;
24
+ for (const match of matches) {
25
+ const contents = this.readFile(match);
26
+ const updated = this.testFileMigrator.migrate(contents);
27
+ if (contents === updated) {
28
+ totalTestsSkipped++;
29
+ }
30
+ else {
31
+ totalTestsUpdated++;
32
+ this.writeFile(match, updated);
33
+ }
34
+ }
35
+ return {
36
+ totalTestsUpdated,
37
+ totalTestsSkipped,
38
+ };
39
+ }
40
+ readFile(match) {
41
+ return StaticToInstanceMigratorImpl.diskUtil.readFile(match);
42
+ }
43
+ writeFile(match, updated) {
44
+ StaticToInstanceMigratorImpl.diskUtil.writeFile(match, updated);
45
+ }
46
+ }
47
+ exports.default = StaticToInstanceMigratorImpl;
48
+ //# sourceMappingURL=StaticToInstanceMigrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticToInstanceMigrator.js","sourceRoot":"","sources":["../../../src/tests/staticToInstanceMigration/StaticToInstanceMigrator.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,uEAAyD;AAIzD,MAAqB,4BAA4B;IAGtC,MAAM,CAAC,QAAQ,GAAG,6BAAQ,CAAA;IAC1B,MAAM,CAAC,KAAK,CAEU;IAErB,UAAU,CAAkB;IAC5B,gBAAgB,CAAkC;IAE1D,YAAsB,OAAwC;QAC1D,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAA;QAChD,IAAI,CA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,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IACnE,CAAC;;AApDL,+CAqDC"}
@@ -0,0 +1,12 @@
1
+ export default class StaticToInstanceTestFileMigratorImpl implements StaticToInstanceTestFileMigrator {
2
+ static Class?: new () => StaticToInstanceTestFileMigrator;
3
+ static Migrator(): StaticToInstanceTestFileMigrator;
4
+ migrate(contents: string): string;
5
+ private hasSuiteImport;
6
+ private findThisCalls;
7
+ private removeStaticFromDeclaration;
8
+ private fixNonNullAssertions;
9
+ }
10
+ export interface StaticToInstanceTestFileMigrator {
11
+ migrate(contents: string): string;
12
+ }
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schema_1 = require("@sprucelabs/schema");
4
+ class StaticToInstanceTestFileMigratorImpl {
5
+ static Class;
6
+ static Migrator() {
7
+ return new (this.Class ?? this)();
8
+ }
9
+ migrate(contents) {
10
+ (0, schema_1.assertOptions)({ contents }, ['contents']);
11
+ // 1a. Remove `static ` only when it appears immediately before a method
12
+ // that has the `@test()` decorator
13
+ // 1b. If the contents include `export default abstract class`,
14
+ // remove `static` from all methods
15
+ const includesAbstractExport = contents.includes('export default abstract class');
16
+ let cleanedUp = includesAbstractExport
17
+ ? contents.replaceAll(' static ', ' ')
18
+ : contents.replace(
19
+ // Matches @test() or @seed(...) followed (on next line) by optional visibility and `static`.
20
+ /(@(?:test\(\)|seed\([^)]*\))\s*\n\s*(?:public|protected)\s+)static\s+/g, '$1');
21
+ // 2. Add `@suite()` above `export default class` if it's not already present
22
+ if (!cleanedUp.includes('@suite')) {
23
+ cleanedUp = cleanedUp.replace(/export default class/, '@suite()\nexport default class');
24
+ }
25
+ // 3. Ensure `suite` is imported from `@sprucelabs/test-utils`
26
+ if (!this.hasSuiteImport(cleanedUp)) {
27
+ if (cleanedUp.includes('{ test')) {
28
+ cleanedUp = cleanedUp.replace('{ test', '{ test, suite');
29
+ }
30
+ else if (cleanedUp.includes('test }')) {
31
+ cleanedUp = cleanedUp.replace('test }', 'test, suite }');
32
+ }
33
+ else {
34
+ cleanedUp = cleanedUp.replace('test,', 'test,\n suite,');
35
+ }
36
+ }
37
+ const thisCallNames = this.findThisCalls(cleanedUp);
38
+ for (const name of thisCallNames) {
39
+ cleanedUp = this.removeStaticFromDeclaration(cleanedUp, name);
40
+ }
41
+ // 4. lifecicle methods
42
+ const methods = ['beforeEach', 'afterEach'];
43
+ for (const method of methods) {
44
+ cleanedUp = cleanedUp.replace(`protected static async ${method}()`, `protected async ${method}()`);
45
+ }
46
+ cleanedUp = this.fixNonNullAssertions(cleanedUp);
47
+ return cleanedUp;
48
+ }
49
+ hasSuiteImport(text) {
50
+ const pattern = new RegExp(`import\\s+(?:[\\s\\S]*?\\bsuite\\b[\\s\\S]*?)\\s+from\\s+['"]@sprucelabs/test-utils['"]`);
51
+ return pattern.test(text);
52
+ }
53
+ findThisCalls(contents) {
54
+ // Matches `this.myProp` if followed by space, punctuation, parentheses, or end of string
55
+ const thisPropertyRegex = /this\.(\w+)(?=[\s.(),;]|$)/g;
56
+ const names = [];
57
+ let match;
58
+ while ((match = thisPropertyRegex.exec(contents)) !== null) {
59
+ const propName = match[1];
60
+ if (!names.includes(propName)) {
61
+ names.push(propName);
62
+ }
63
+ }
64
+ return names;
65
+ }
66
+ removeStaticFromDeclaration(contents, name) {
67
+ /**
68
+ * 1) Remove `static` for methods/getters/setters, e.g.:
69
+ * private static async doSomething() => private async doSomething()
70
+ * private static get value() => private get value()
71
+ * private static set value(v) => private set value(v)
72
+ */
73
+ const methodPattern = new RegExp(`((?:public|protected|private)?\\s+)?` + // group 1
74
+ `static\\s+` + // literal "static "
75
+ `(?:(async)\\s+)?` + // group 2: "async"?
76
+ `(?:(get|set)\\s+)?` + // group 3: "get" or "set"?
77
+ `(${name})\\s*\\(`, // group 4: the identifier + '('
78
+ 'g');
79
+ let updated = contents.replace(methodPattern, (match, g1, g2, g3, g4) => {
80
+ const asyncPart = g2 ? g2 + ' ' : '';
81
+ const accessorPart = g3 ? g3 + ' ' : '';
82
+ // Rebuild the declaration without "static"
83
+ return `${g1 ?? ''}${asyncPart}${accessorPart}${g4}(`;
84
+ });
85
+ /**
86
+ * 2) Remove `static` from property declarations and add a non-null assertion.
87
+ * e.g.
88
+ * private static myProp: Type => private myProp!: Type
89
+ */
90
+ const propertyPattern = new RegExp(`((?:public|protected|private)?\\s+)?` + // group 1: optional visibility
91
+ `static\\s+` + // literal "static "
92
+ `(${name})` + // group 2: the property name
93
+ `(?=[\\s=:\\[;]|$)`, // lookahead: space, '=', ':', '[', ';', or end-of-string
94
+ 'g');
95
+ updated = updated.replace(propertyPattern, (match, g1, g2) => {
96
+ // g1 = "private " / "public " / "protected " or empty
97
+ // g2 = property name
98
+ return `${g1 ?? ''}${g2}!`;
99
+ });
100
+ return updated;
101
+ }
102
+ fixNonNullAssertions(contents) {
103
+ const lines = contents.split('\n');
104
+ const propertyRegex = /^(\s*)(public|protected|private)(\s+readonly)?\s+(\w+)\s*(!)?\s*:\s*([^=;]+)(=.*)?;?$/;
105
+ const updatedLines = lines.map((originalLine) => {
106
+ // Skip lines containing "static"
107
+ if (originalLine.includes('static')) {
108
+ return originalLine;
109
+ }
110
+ const match = originalLine.match(propertyRegex);
111
+ if (!match) {
112
+ return originalLine;
113
+ }
114
+ let [, leadingWhitespace, visibility, readonlyPart = '', propName, exclamation, typeDecl, assignment,] = match;
115
+ // Trim trailing whitespace from the type
116
+ typeDecl = typeDecl.trim();
117
+ if (assignment) {
118
+ // Remove the bang if there's an assignment
119
+ exclamation = '';
120
+ // Remove trailing semicolon
121
+ assignment = assignment.replace(/;$/, '');
122
+ // Ensure we always have " = " at the start
123
+ // E.g. "=something" => " = something"
124
+ assignment = assignment.replace(/^=\s*/, ' = ');
125
+ }
126
+ else {
127
+ // No assignment? Add bang
128
+ exclamation = '!';
129
+ }
130
+ // Rebuild line, preserving leading indentation
131
+ const rebuilt = `${leadingWhitespace}${visibility}${readonlyPart} ${propName}${exclamation}: ${typeDecl}${assignment ?? ''}`;
132
+ return rebuilt;
133
+ });
134
+ return updatedLines.join('\n');
135
+ }
136
+ }
137
+ exports.default = StaticToInstanceTestFileMigratorImpl;
138
+ //# sourceMappingURL=StaticToInstanceTestFileMigrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticToInstanceTestFileMigrator.js","sourceRoot":"","sources":["../../../src/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAElD,MAAqB,oCAAoC;IAG9C,MAAM,CAAC,KAAK,CAA6C;IAEzD,MAAM,CAAC,QAAQ;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAA;IACrC,CAAC;IAEM,OAAO,CAAC,QAAgB;QAC3B,IAAA,sBAAa,EAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;QAEzC,wEAAwE;QACxE,sCAAsC;QACtC,+DAA+D;QAC/D,uCAAuC;QACvC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,QAAQ,CAC5C,+BAA+B,CAClC,CAAA;QACD,IAAI,SAAS,GAAG,sBAAsB;YAClC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,CAAC;YACtC,CAAC,CAAC,QAAQ,CAAC,OAAO;YACZ,6FAA6F;YAC7F,wEAAwE,EACxE,IAAI,CACP,CAAA;QAEP,6EAA6E;QAC7E,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YAChC,SAAS,GAAG,SAAS,CAAC,OAAO,CACzB,sBAAsB,EACtB,gCAAgC,CACnC,CAAA;QACL,CAAC;QAED,8DAA8D;QAC9D,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;YAClC,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;g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A;YACrB,CAAC;YAED,+CAA+C;YAC/C,MAAM,OAAO,GAAG,GAAG,iBAAiB,GAAG,UAAU,GAAG,YAAY,IAAI,QAAQ,GAAG,WAAW,KAAK,QAAQ,GAAG,UAAU,IAAI,EAAE,EAAE,CAAA;YAC5H,OAAO,OAAO,CAAA;QAClB,CAAC,CAAC,CAAA;QAEF,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAClC,CAAC;CACJ;AA9LD,uDA8LC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = isCi;
4
4
  function isCi() {
5
5
  const env = process.env;
6
- if (process.env.IS_TESTING_SELF) {
6
+ if (process.env.IS_TESTING_SELF === 'true') {
7
7
  return false;
8
8
  }
9
9
  if ([
@@ -1 +1 @@
1
- {"version":3,"file":"isCi.js","sourceRoot":"","sources":["../../src/utilities/isCi.ts"],"names":[],"mappings":";;AAAA,uBAuBC;AAvBD,SAAwB,IAAI;IACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IAEvB,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,IACI;QACI,QAAQ;QACR,UAAU;QACV,UAAU;QACV,WAAW;QACX,gBAAgB;QAChB,WAAW;QACX,OAAO;KACV,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC;QAC7B,GAAG,CAAC,OAAO,KAAK,UAAU,EAC5B,CAAC;QACC,OAAO,IAAI,CAAA;IACf,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC"}
1
+ {"version":3,"file":"isCi.js","sourceRoot":"","sources":["../../src/utilities/isCi.ts"],"names":[],"mappings":";;AAAA,uBAuBC;AAvBD,SAAwB,IAAI;IACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IAEvB,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,EAAE,CAAC;QACzC,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,IACI;QACI,QAAQ;QACR,UAAU;QACV,UAAU;QACV,WAAW;QACX,gBAAgB;QAChB,WAAW;QACX,OAAO;KACV,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC;QAC7B,GAAG,CAAC,OAAO,KAAK,UAAU,EAC5B,CAAC;QACC,OAAO,IAAI,CAAA;IACf,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "23.1.0",
7
+ "version": "24.1.0",
8
8
  "skill": {
9
9
  "namespace": "spruce-cli",
10
10
  "upgradeIgnoreList": [
@@ -73,18 +73,18 @@
73
73
  },
74
74
  "dependencies": {
75
75
  "@jest/reporters": "^29.7.0",
76
- "@sprucelabs/error": "^6.0.566",
76
+ "@sprucelabs/error": "^6.0.577",
77
77
  "@sprucelabs/globby": "^2.0.501",
78
- "@sprucelabs/heartwood-view-controllers": "^116.0.15",
79
- "@sprucelabs/jest-json-reporter": "^8.0.567",
80
- "@sprucelabs/mercury-client": "^42.0.689",
81
- "@sprucelabs/mercury-event-emitter": "^42.0.689",
82
- "@sprucelabs/mercury-types": "^47.2.0",
83
- "@sprucelabs/schema": "^31.0.19",
84
- "@sprucelabs/spruce-core-schemas": "^40.1.605",
85
- "@sprucelabs/spruce-event-utils": "^40.1.394",
86
- "@sprucelabs/spruce-skill-utils": "^31.2.16",
87
- "@sprucelabs/spruce-templates": "^23.0.0",
78
+ "@sprucelabs/heartwood-view-controllers": "^117.2.5",
79
+ "@sprucelabs/jest-json-reporter": "^8.0.578",
80
+ "@sprucelabs/mercury-client": "^42.0.733",
81
+ "@sprucelabs/mercury-event-emitter": "^42.0.733",
82
+ "@sprucelabs/mercury-types": "^47.2.28",
83
+ "@sprucelabs/schema": "^31.0.44",
84
+ "@sprucelabs/spruce-core-schemas": "^40.1.634",
85
+ "@sprucelabs/spruce-event-utils": "^40.2.32",
86
+ "@sprucelabs/spruce-skill-utils": "^31.2.47",
87
+ "@sprucelabs/spruce-templates": "^24.1.0",
88
88
  "@typescript-eslint/eslint-plugin": "^7.7.1",
89
89
  "@typescript-eslint/parser": "^7.7.1",
90
90
  "cfonts": "^3.3.0",
@@ -101,32 +101,31 @@
101
101
  "md5": "^2.3.0",
102
102
  "open": "^8.4.2",
103
103
  "ora": "5.4.1",
104
- "semver": "^7.6.3",
104
+ "semver": "^7.7.1",
105
105
  "string-argv": "^0.3.2",
106
106
  "terminal-kit": "sprucelabsai/terminal-kit",
107
107
  "tree-kill": "^1.2.2",
108
108
  "tsutils": "^3.21.0",
109
109
  "typescript": "^5.7.3",
110
- "uuid": "^11.0.5"
110
+ "uuid": "^11.1.0"
111
111
  },
112
112
  "devDependencies": {
113
- "@sprucelabs/data-stores": "^28.5.24",
114
- "@sprucelabs/jest-sheets-reporter": "^3.0.200",
115
- "@sprucelabs/mercury-core-events": "^25.1.0",
116
- "@sprucelabs/resolve-path-aliases": "^2.0.527",
117
- "@sprucelabs/spruce-conversation-plugin": "^65.0.9",
118
- "@sprucelabs/spruce-deploy-plugin": "^65.0.9",
119
- "@sprucelabs/spruce-store-plugin": "^65.0.9",
120
- "@sprucelabs/spruce-test-fixtures": "^65.0.9",
121
- "@sprucelabs/test": "^9.0.67",
122
- "@sprucelabs/test-utils": "^5.1.546",
113
+ "@sprucelabs/data-stores": "^28.5.57",
114
+ "@sprucelabs/mercury-core-events": "^26.0.9",
115
+ "@sprucelabs/resolve-path-aliases": "^2.0.531",
116
+ "@sprucelabs/spruce-conversation-plugin": "^66.0.20",
117
+ "@sprucelabs/spruce-deploy-plugin": "^66.0.20",
118
+ "@sprucelabs/spruce-store-plugin": "^66.0.20",
119
+ "@sprucelabs/spruce-test-fixtures": "^66.0.20",
120
+ "@sprucelabs/test": "^9.0.71",
121
+ "@sprucelabs/test-utils": "^5.3.4",
123
122
  "@types/blessed": "^0.1.25",
124
123
  "@types/eslint": "^9.6.1",
125
124
  "@types/fs-extra": "^11.0.4",
126
125
  "@types/inquirer": "^9.0.7",
127
- "@types/lodash": "^4.17.14",
126
+ "@types/lodash": "^4.17.15",
128
127
  "@types/md5": "^2.3.5",
129
- "@types/node": "^22.10.7",
128
+ "@types/node": "^22.13.4",
130
129
  "@types/promise.allsettled": "^1.0.6",
131
130
  "@types/ps-node": "^0.1.3",
132
131
  "@types/semver": "^7.5.8",
@@ -139,7 +138,7 @@
139
138
  "concurrently": "^9.1.2",
140
139
  "conventional-changelog-sprucelabs": "2.0.1",
141
140
  "dotenv": "^16.4.7",
142
- "eslint": "^9.18.0",
141
+ "eslint": "^9.20.1",
143
142
  "eslint-config-spruce": "^11.2.26",
144
143
  "find-process": "^1.4.10",
145
144
  "jest": "^29.7.0",
@@ -555,23 +554,7 @@
555
554
  "moduleNameMapper": {
556
555
  "^#spruce/schemas/fields/(.*)": "<rootDir>/node_modules/@sprucelabs/schema/build/.spruce/schemas/fields/$1",
557
556
  "^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
558
- },
559
- "reporters": [
560
- "default",
561
- [
562
- "@sprucelabs/jest-sheets-reporter",
563
- {
564
- "sheetId": "1DoWM7mYgGDa-PJXptLomrZmbIBZiuxS1YiAsRXU2Gm0",
565
- "worksheetId": 889384139,
566
- "testMap": {
567
- "generatesExpectedPermissionContract": "P11",
568
- "syncsNewPermissionsWhenMade": "P13",
569
- "combinedFileImportsAllPermissions": "P14"
570
- }
571
- }
572
- ],
573
- "jest-junit"
574
- ]
557
+ }
575
558
  },
576
559
  "jest-junit": {
577
560
  "addFileAttribute": "true"
@@ -588,5 +571,5 @@
588
571
  "open"
589
572
  ]
590
573
  },
591
- "gitHead": "94ce410c05180cdfa9b6ca4b9e47061d52ac4e71"
574
+ "gitHead": "1dba2146c4738dbd9c94b2937b3553addee5a1a4"
592
575
  }