@ooneex/seeds 1.6.3 → 1.8.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.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  import { EContainerScope } from "@ooneex/container";
2
+ import { Environment } from "@ooneex/app-env";
2
3
  type SeedClassType = new (...args: any[]) => ISeed;
3
4
  interface ISeed {
4
5
  run: <T = unknown>(data?: unknown[]) => Promise<T> | T;
5
6
  isActive: () => Promise<boolean> | boolean;
6
7
  getDependencies: () => Promise<SeedClassType[]> | SeedClassType[];
8
+ getEnv: () => Promise<Environment[]> | Environment[];
7
9
  }
8
10
  declare const decorator: {
9
11
  seed: (scope?: EContainerScope) => (target: SeedClassType) => void;
10
12
  };
11
- declare const getSeeds: () => ISeed[];
13
+ declare const getSeeds: () => Promise<ISeed[]>;
12
14
  declare const run: () => Promise<void>;
13
15
  declare const seedCreate: (config: {
14
16
  name: string;
@@ -20,4 +22,9 @@ declare const seedCreate: (config: {
20
22
  testPath: string;
21
23
  dataPath: string;
22
24
  }>;
23
- export { seedCreate, run, getSeeds, decorator, SeedClassType, ISeed };
25
+ declare const seedTestCreate: (config: {
26
+ name: string;
27
+ testsDir: string;
28
+ module?: string;
29
+ }) => Promise<string>;
30
+ export { seedTestCreate, seedCreate, run, getSeeds, decorator, SeedClassType, ISeed, Environment };
package/dist/index.js CHANGED
@@ -16,11 +16,19 @@ var decorator = {
16
16
  };
17
17
  // src/getSeeds.ts
18
18
  import { container as container2 } from "@ooneex/container";
19
- var getSeeds = () => {
20
- const seedInstances = SEEDS_CONTAINER.map((SeedClass) => {
21
- return container2.get(SeedClass);
22
- });
23
- return seedInstances.filter((seed) => seed.isActive());
19
+ var getSeeds = async () => {
20
+ const currentEnv = Bun.env.APP_ENV;
21
+ const seeds = [];
22
+ for (const SeedClass of SEEDS_CONTAINER) {
23
+ const seed = container2.get(SeedClass);
24
+ if (!await seed.isActive())
25
+ continue;
26
+ const allowedEnvs = await seed.getEnv();
27
+ if (allowedEnvs.length > 0 && currentEnv && !allowedEnvs.includes(currentEnv))
28
+ continue;
29
+ seeds.push(seed);
30
+ }
31
+ return seeds;
24
32
  };
25
33
  // src/run.ts
26
34
  import { parseArgs } from "util";
@@ -46,7 +54,7 @@ var run = async () => {
46
54
  strict: false,
47
55
  allowPositionals: true
48
56
  });
49
- const seeds = getSeeds();
57
+ const seeds = await getSeeds();
50
58
  const logger = new TerminalLogger;
51
59
  if (seeds.length === 0) {
52
60
  logger.info(`No seeds found
@@ -77,15 +85,6 @@ var run = async () => {
77
85
  });
78
86
  for (const seed of seeds) {
79
87
  const seedName = seed.constructor.name;
80
- if (!seed.isActive()) {
81
- logger.warn(`Seed ${seedName} is inactive
82
- `, undefined, {
83
- showTimestamp: false,
84
- showArrow: false,
85
- useSymbol: true
86
- });
87
- continue;
88
- }
89
88
  try {
90
89
  await runSeed(seed);
91
90
  logger.success(`Seed ${seedName} completed
@@ -118,10 +117,10 @@ import { toKebabCase, toPascalCase } from "@ooneex/utils";
118
117
  var {Glob } = globalThis.Bun;
119
118
 
120
119
  // src/seed.test.txt
121
- var seed_test_default = `import { existsSync } from "node:fs";
122
- import { join } from "node:path";
120
+ var seed_test_default = `import { join } from "node:path";
123
121
  import { describe, expect, test } from "bun:test";
124
122
  import { {{NAME}}Seed } from "@module/{{MODULE}}/seeds/{{NAME}}Seed";
123
+ import {{MODULE}}Yml from "../../{{MODULE}}.yml";
125
124
 
126
125
  describe("{{NAME}}Seed", () => {
127
126
  test("should have class name ending with 'Seed'", () => {
@@ -143,15 +142,35 @@ describe("{{NAME}}Seed", () => {
143
142
  expect(typeof {{NAME}}Seed.prototype.getDependencies).toBe("function");
144
143
  });
145
144
 
146
- test("should have a data yml file", () => {
147
- const dataFile = join(__dirname, "..", "src", "seeds", "{{DATA_FILE}}.yml");
148
- expect(existsSync(dataFile)).toBe(true);
145
+ test("should have 'getEnv' method", () => {
146
+ expect({{NAME}}Seed.prototype.getEnv).toBeDefined();
147
+ expect(typeof {{NAME}}Seed.prototype.getEnv).toBe("function");
148
+ });
149
+
150
+ test("should return empty array from 'getEnv' by default", () => {
151
+ const seed = new {{NAME}}Seed();
152
+ expect(seed.getEnv()).toEqual([]);
153
+ });
154
+
155
+ test("should have a data yml file", async () => {
156
+ const dataFile = Bun.file(join(import.meta.dir, "../../src/seeds/{{DATA_FILE}}.yml"));
157
+ expect(await dataFile.exists()).toBe(true);
158
+ });
159
+
160
+ test("should match the locked hash in {{MODULE}}.yml", async () => {
161
+ const content = await Bun.file(join(import.meta.dir, "../../src/seeds/{{DATA_FILE}}.yml")).text();
162
+ const actualHash = new Bun.CryptoHasher("sha256").update(content).digest("hex");
163
+
164
+ const lockedSeeds = {{MODULE}}Yml.seeds as Record<string, { hash: string }>;
165
+ const lockedHash = lockedSeeds["{{DATA_FILE}}"]?.hash;
166
+ expect(lockedHash).toBeDefined();
167
+ expect(actualHash).toBe(lockedHash as string);
149
168
  });
150
169
  });
151
170
  `;
152
171
 
153
172
  // src/seed.txt
154
- var seed_default = `import { decorator, type ISeed, type SeedClassType } from "@ooneex/seeds";
173
+ var seed_default = `import { decorator, Environment, type ISeed, type SeedClassType } from "@ooneex/seeds";
155
174
  import data from "./{{ dataFile }}.yml";
156
175
 
157
176
  @decorator.seed()
@@ -170,6 +189,10 @@ export class {{ name }} implements ISeed {
170
189
  public async getDependencies(): Promise<SeedClassType[]> {
171
190
  return [];
172
191
  }
192
+
193
+ public getEnv(): Environment[] {
194
+ return [];
195
+ }
173
196
  }
174
197
  `;
175
198
 
@@ -201,11 +224,30 @@ var seedCreate = async (config) => {
201
224
  dataPath: join(seedsDir, `${dataFile}.yml`)
202
225
  };
203
226
  };
227
+ // src/seedTestCreate.ts
228
+ import { join as join2 } from "path";
229
+ import { toKebabCase as toKebabCase2 } from "@ooneex/utils";
230
+ var seedTestCreate = async (config) => {
231
+ const { name, testsDir, module } = config;
232
+ const testPath = join2(process.cwd(), testsDir, `${name}.spec.ts`);
233
+ const testFile = Bun.file(testPath);
234
+ if (await testFile.exists())
235
+ return testPath;
236
+ const baseName = name.replace(/Seed$/, "");
237
+ const dataFile = toKebabCase2(name);
238
+ const content = seed_test_default.replace(/\{\{NAME\}\}/g, baseName).replace(/\{\{DATA_FILE\}\}/g, dataFile).replace(/\{\{MODULE\}\}/g, module ?? "");
239
+ await Bun.write(testPath, content);
240
+ return testPath;
241
+ };
242
+ // src/types.ts
243
+ import { Environment } from "@ooneex/app-env";
204
244
  export {
245
+ seedTestCreate,
205
246
  seedCreate,
206
247
  run,
207
248
  getSeeds,
208
- decorator
249
+ decorator,
250
+ Environment
209
251
  };
210
252
 
211
- //# debugId=A981E280B56E88AB64756E2164756E21
253
+ //# debugId=DB624239BB3885A664756E2164756E21
package/dist/index.js.map CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["src/decorators.ts", "src/container.ts", "src/getSeeds.ts", "src/run.ts", "src/seedCreate.ts"],
3
+ "sources": ["src/decorators.ts", "src/container.ts", "src/getSeeds.ts", "src/run.ts", "src/seedCreate.ts", "src/seedTestCreate.ts", "src/types.ts"],
4
4
  "sourcesContent": [
5
5
  "import { container, EContainerScope } from \"@ooneex/container\";\nimport { SEEDS_CONTAINER } from \"./container\";\nimport type { SeedClassType } from \"./types\";\n\nexport const decorator = {\n seed: (scope: EContainerScope = EContainerScope.Singleton) => {\n return (target: SeedClassType): void => {\n container.add(target, scope);\n SEEDS_CONTAINER.push(target);\n };\n },\n};\n",
6
6
  "import type { SeedClassType } from \"./types\";\n\nexport const SEEDS_CONTAINER: SeedClassType[] = [];\n",
7
- "import { container } from \"@ooneex/container\";\nimport { SEEDS_CONTAINER } from \"./container\";\nimport type { ISeed } from \"./types\";\n\nexport const getSeeds = (): ISeed[] => {\n const seedInstances = SEEDS_CONTAINER.map((SeedClass) => {\n return container.get(SeedClass);\n });\n\n return seedInstances.filter((seed) => seed.isActive());\n};\n",
8
- "import { parseArgs } from \"node:util\";\nimport { container } from \"@ooneex/container\";\nimport type { IException } from \"@ooneex/exception\";\nimport { TerminalLogger } from \"@ooneex/logger\";\nimport { getSeeds } from \"./getSeeds\";\nimport type { ISeed } from \"./types\";\n\nconst runSeed = async (seed: ISeed): Promise<void> => {\n const data = [];\n\n const dependencies = await seed.getDependencies();\n\n for (const dependency of dependencies) {\n const dep = container.get(dependency);\n data.push(await runSeed(dep));\n }\n\n await seed.run(data);\n};\n\nexport const run = async (): Promise<void> => {\n const { values } = parseArgs({\n args: Bun.argv,\n options: {\n drop: {\n type: \"boolean\",\n },\n },\n strict: false,\n allowPositionals: true,\n });\n\n const seeds = getSeeds();\n const logger = new TerminalLogger();\n\n if (seeds.length === 0) {\n logger.info(\"No seeds found\\n\", undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n return;\n }\n\n if (values.drop) {\n const database = container.getConstant<{ drop: () => Promise<void> }>(\"database\");\n if (database) {\n await database.drop();\n logger.info(\"Database dropped\\n\", undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n }\n }\n\n logger.info(`Running ${seeds.length} seed(s)...\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n\n for (const seed of seeds) {\n const seedName = seed.constructor.name;\n\n if (!seed.isActive()) {\n logger.warn(`Seed ${seedName} is inactive\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n continue;\n }\n\n try {\n await runSeed(seed);\n logger.success(`Seed ${seedName} completed\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n } catch (error) {\n logger.error(`Seed ${seedName} failed\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n logger.error(error as IException);\n process.exit(1);\n }\n }\n\n try {\n const database = container.getConstant<{ close: () => Promise<void> }>(\"database\");\n if (database) {\n await database.close();\n }\n } catch {\n // No database constant registered — nothing to close\n }\n};\n",
9
- "import { join } from \"node:path\";\nimport { toKebabCase, toPascalCase } from \"@ooneex/utils\";\nimport { Glob } from \"bun\";\nimport testTemplate from \"./seed.test.txt\";\nimport template from \"./seed.txt\";\n\nexport const seedCreate = async (config: {\n name: string;\n seedsDir?: string;\n testsDir?: string;\n module?: string;\n}): Promise<{ seedPath: string; testPath: string; dataPath: string }> => {\n const name = toPascalCase(config.name).replace(/Seed$/, \"\");\n const seedName = `${name}Seed`;\n const dataFile = toKebabCase(seedName);\n const seedsDir = config.seedsDir || \"seeds\";\n const testsDir = config.testsDir || join(\"tests\", \"seeds\");\n\n const seedContent = template.replaceAll(\"{{ name }}\", seedName).replaceAll(\"{{ dataFile }}\", dataFile);\n await Bun.write(join(process.cwd(), seedsDir, `${seedName}.ts`), seedContent);\n\n await Bun.write(join(process.cwd(), seedsDir, `${dataFile}.yml`), \"# Seed data\\n\");\n\n const testContent = testTemplate\n .replace(/\\{\\{NAME\\}\\}/g, name)\n .replace(/\\{\\{DATA_FILE\\}\\}/g, dataFile)\n .replace(/\\{\\{MODULE\\}\\}/g, config.module ?? \"\");\n await Bun.write(join(process.cwd(), testsDir, `${seedName}.spec.ts`), testContent);\n\n const imports: string[] = [];\n const glob = new Glob(\"**/*Seed.ts\");\n for await (const file of glob.scan(join(process.cwd(), seedsDir))) {\n const seedClassName = file.replace(/\\.ts$/, \"\");\n imports.push(`export { ${seedClassName} } from './${seedClassName}';`);\n }\n\n await Bun.write(join(process.cwd(), seedsDir, \"seeds.ts\"), `${imports.sort().join(\"\\n\")}\\n`);\n\n return {\n seedPath: join(seedsDir, `${seedName}.ts`),\n testPath: join(testsDir, `${seedName}.spec.ts`),\n dataPath: join(seedsDir, `${dataFile}.yml`),\n };\n};\n"
7
+ "import { container } from \"@ooneex/container\";\nimport { SEEDS_CONTAINER } from \"./container\";\nimport type { Environment, ISeed } from \"./types\";\n\nexport const getSeeds = async (): Promise<ISeed[]> => {\n const currentEnv = Bun.env.APP_ENV as Environment | undefined;\n const seeds: ISeed[] = [];\n\n for (const SeedClass of SEEDS_CONTAINER) {\n const seed = container.get(SeedClass);\n if (!(await seed.isActive())) continue;\n\n const allowedEnvs = await seed.getEnv();\n if (allowedEnvs.length > 0 && currentEnv && !allowedEnvs.includes(currentEnv)) continue;\n\n seeds.push(seed);\n }\n\n return seeds;\n};\n",
8
+ "import { parseArgs } from \"node:util\";\nimport { container } from \"@ooneex/container\";\nimport type { IException } from \"@ooneex/exception\";\nimport { TerminalLogger } from \"@ooneex/logger\";\nimport { getSeeds } from \"./getSeeds\";\nimport type { ISeed } from \"./types\";\n\nconst runSeed = async (seed: ISeed): Promise<void> => {\n const data = [];\n\n const dependencies = await seed.getDependencies();\n\n for (const dependency of dependencies) {\n const dep = container.get(dependency);\n data.push(await runSeed(dep));\n }\n\n await seed.run(data);\n};\n\nexport const run = async (): Promise<void> => {\n const { values } = parseArgs({\n args: Bun.argv,\n options: {\n drop: {\n type: \"boolean\",\n },\n },\n strict: false,\n allowPositionals: true,\n });\n\n const seeds = await getSeeds();\n const logger = new TerminalLogger();\n\n if (seeds.length === 0) {\n logger.info(\"No seeds found\\n\", undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n return;\n }\n\n if (values.drop) {\n const database = container.getConstant<{ drop: () => Promise<void> }>(\"database\");\n if (database) {\n await database.drop();\n logger.info(\"Database dropped\\n\", undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n }\n }\n\n logger.info(`Running ${seeds.length} seed(s)...\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n\n for (const seed of seeds) {\n const seedName = seed.constructor.name;\n\n try {\n await runSeed(seed);\n logger.success(`Seed ${seedName} completed\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n } catch (error) {\n logger.error(`Seed ${seedName} failed\\n`, undefined, {\n showTimestamp: false,\n showArrow: false,\n useSymbol: true,\n });\n logger.error(error as IException);\n process.exit(1);\n }\n }\n\n try {\n const database = container.getConstant<{ close: () => Promise<void> }>(\"database\");\n if (database) {\n await database.close();\n }\n } catch {\n // No database constant registered — nothing to close\n }\n};\n",
9
+ "import { join } from \"node:path\";\nimport { toKebabCase, toPascalCase } from \"@ooneex/utils\";\nimport { Glob } from \"bun\";\nimport testTemplate from \"./seed.test.txt\";\nimport template from \"./seed.txt\";\n\nexport const seedCreate = async (config: {\n name: string;\n seedsDir?: string;\n testsDir?: string;\n module?: string;\n}): Promise<{ seedPath: string; testPath: string; dataPath: string }> => {\n const name = toPascalCase(config.name).replace(/Seed$/, \"\");\n const seedName = `${name}Seed`;\n const dataFile = toKebabCase(seedName);\n const seedsDir = config.seedsDir || \"seeds\";\n const testsDir = config.testsDir || join(\"tests\", \"seeds\");\n\n const seedContent = template.replaceAll(\"{{ name }}\", seedName).replaceAll(\"{{ dataFile }}\", dataFile);\n await Bun.write(join(process.cwd(), seedsDir, `${seedName}.ts`), seedContent);\n\n await Bun.write(join(process.cwd(), seedsDir, `${dataFile}.yml`), \"# Seed data\\n\");\n\n const testContent = testTemplate\n .replace(/\\{\\{NAME\\}\\}/g, name)\n .replace(/\\{\\{DATA_FILE\\}\\}/g, dataFile)\n .replace(/\\{\\{MODULE\\}\\}/g, config.module ?? \"\");\n await Bun.write(join(process.cwd(), testsDir, `${seedName}.spec.ts`), testContent);\n\n const imports: string[] = [];\n const glob = new Glob(\"**/*Seed.ts\");\n for await (const file of glob.scan(join(process.cwd(), seedsDir))) {\n const seedClassName = file.replace(/\\.ts$/, \"\");\n imports.push(`export { ${seedClassName} } from './${seedClassName}';`);\n }\n\n await Bun.write(join(process.cwd(), seedsDir, \"seeds.ts\"), `${imports.sort().join(\"\\n\")}\\n`);\n\n return {\n seedPath: join(seedsDir, `${seedName}.ts`),\n testPath: join(testsDir, `${seedName}.spec.ts`),\n dataPath: join(seedsDir, `${dataFile}.yml`),\n };\n};\n",
10
+ "import { join } from \"node:path\";\nimport { toKebabCase } from \"@ooneex/utils\";\nimport testTemplate from \"./seed.test.txt\";\n\nexport const seedTestCreate = async (config: {\n name: string;\n testsDir: string;\n module?: string;\n}): Promise<string> => {\n const { name, testsDir, module } = config;\n const testPath = join(process.cwd(), testsDir, `${name}.spec.ts`);\n\n const testFile = Bun.file(testPath);\n if (await testFile.exists()) return testPath;\n\n const baseName = name.replace(/Seed$/, \"\");\n const dataFile = toKebabCase(name);\n\n const content = testTemplate\n .replace(/\\{\\{NAME\\}\\}/g, baseName)\n .replace(/\\{\\{DATA_FILE\\}\\}/g, dataFile)\n .replace(/\\{\\{MODULE\\}\\}/g, module ?? \"\");\n await Bun.write(testPath, content);\n\n return testPath;\n};\n",
11
+ "import { Environment } from \"@ooneex/app-env\";\nexport { Environment };\n\n// biome-ignore lint/suspicious/noExplicitAny: trust me\nexport type SeedClassType = new (...args: any[]) => ISeed;\n\nexport interface ISeed {\n run: <T = unknown>(data?: unknown[]) => Promise<T> | T;\n isActive: () => Promise<boolean> | boolean;\n getDependencies: () => Promise<SeedClassType[]> | SeedClassType[];\n getEnv: () => Promise<Environment[]> | Environment[];\n}\n"
10
12
  ],
11
- "mappings": ";;AAAA;;;ACEO,IAAM,kBAAmC,CAAC;;;ADE1C,IAAM,YAAY;AAAA,EACvB,MAAM,CAAC,QAAyB,gBAAgB,cAAc;AAAA,IAC5D,OAAO,CAAC,WAAgC;AAAA,MACtC,UAAU,IAAI,QAAQ,KAAK;AAAA,MAC3B,gBAAgB,KAAK,MAAM;AAAA;AAAA;AAGjC;;AEXA,sBAAS;AAIF,IAAM,WAAW,MAAe;AAAA,EACrC,MAAM,gBAAgB,gBAAgB,IAAI,CAAC,cAAc;AAAA,IACvD,OAAO,WAAU,IAAI,SAAS;AAAA,GAC/B;AAAA,EAED,OAAO,cAAc,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC;AAAA;;ACTvD;AACA,sBAAS;AAET;AAIA,IAAM,UAAU,OAAO,SAA+B;AAAA,EACpD,MAAM,OAAO,CAAC;AAAA,EAEd,MAAM,eAAe,MAAM,KAAK,gBAAg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AA,EAEjC,MAAM,UAAU,kBACb,QAAQ,iBAAiB,QAAQ,EACjC,QAAQ,sBAAsB,QAAQ,EACtC,QAAQ,mBAAmB,UAAU,EAAE;AAAA,EAC1C,MAAM,IAAI,MAAM,UAAU,OAAO;AAAA,EAEjC,OAAO;AAAA;;ACxBT;",
14
+ "debugId": "DB624239BB3885A664756E2164756E21",
13
15
  "names": []
14
16
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ooneex/seeds",
3
3
  "description": "Database seeding framework for populating initial data, fixtures, and test datasets with execution logging and idempotent operations",
4
- "version": "1.6.3",
4
+ "version": "1.8.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -30,10 +30,11 @@
30
30
  "dependencies": {
31
31
  "@ooneex/container": "^1.5.1",
32
32
  "@ooneex/logger": "^1.3.5",
33
- "@ooneex/utils": "^0.4.9"
33
+ "@ooneex/utils": "^0.4.12"
34
34
  },
35
35
  "devDependencies": {
36
- "@ooneex/exception": "^1.2.9"
36
+ "@ooneex/exception": "^1.2.10",
37
+ "@ooneex/app-env": "^1.9.0"
37
38
  },
38
39
  "keywords": [
39
40
  "bun",