@redmix/cli-data-migrate 0.0.1
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/LICENSE +21 -0
- package/README.md +14 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +4 -0
- package/dist/commands/install.d.ts +6 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +58 -0
- package/dist/commands/installHandler.d.ts +5 -0
- package/dist/commands/installHandler.d.ts.map +1 -0
- package/dist/commands/installHandler.js +115 -0
- package/dist/commands/up.d.ts +7 -0
- package/dist/commands/up.d.ts.map +1 -0
- package/dist/commands/up.js +69 -0
- package/dist/commands/upHandler.d.ts +4 -0
- package/dist/commands/upHandler.d.ts.map +1 -0
- package/dist/commands/upHandler.js +214 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/lib/colors.d.ts +17 -0
- package/dist/lib/colors.d.ts.map +1 -0
- package/dist/lib/colors.js +48 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Redmix
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# CLI Packages - Data Migrate
|
2
|
+
|
3
|
+
Redwood's data migrations as a standalone CLI command.
|
4
|
+
The utility here is mainly for Docker.
|
5
|
+
|
6
|
+
```
|
7
|
+
npx @redwoodjs/cli-data-migrate --help
|
8
|
+
```
|
9
|
+
|
10
|
+
Run data migrations:
|
11
|
+
|
12
|
+
```
|
13
|
+
npx @redwoodjs/cli-data-migrate
|
14
|
+
```
|
package/dist/bin.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
"use strict";var L=Object.create;var M=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var w=(t,r)=>()=>(t&&(r=t(t=0)),r);var W=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of R(r))!U.call(t,o)&&o!==e&&M(t,o,{get:()=>r[o],enumerable:!(i=N(r,o))||i.enumerable});return t};var d=(t,r,e)=>(e=t!=null?L(V(t)):{},W(r||!t||!t.__esModule?M(e,"default",{value:t,enumerable:!0}):e,t));var a,c,E=w(()=>{"use strict";a=d(require("chalk")),c={error:a.default.bold.red,warning:a.default.hex("#ffa500"),highlight:a.default.hex("#ffa500"),success:a.default.green,info:a.default.grey,bold:a.default.bold,underline:a.default.underline,note:a.default.blue,tip:a.default.green,important:a.default.magenta,caution:a.default.red,link:a.default.hex("#e8e8e8")}});async function O({importDbClientFromDist:t,distPath:r}){let e,i=!1;if(t){if(!f.default.existsSync(r)){console.warn(`Can't find api dist at ${r}. You may need to build first: yarn rw build api`),process.exitCode=1;return}let p=m.default.join(r,"lib","db.js");if(!f.default.existsSync(p)){console.error(`Can't find db.js at ${p}. Redwood expects the db.js file to be in the ${m.default.join(r,"lib")} directory`),process.exitCode=1;return}e=(await import(p)).db}else(0,u.registerApiSideBabelHook)(),i=!0,e=require(m.default.join((0,h.getPaths)().api.lib,"db")).db;let o=await B(e);if(!o.length){console.info(c.success(`
|
3
|
+
${q}
|
4
|
+
`)),process.exitCode=0;return}let s={run:0,skipped:0,error:0},n=o.map(p=>{let D=m.default.basename(p.path,".js");return{title:D,skip(){return s.error>0?(s.skipped++,!0):!1},async task(){i||(0,u.registerApiSideBabelHook)();try{let{startedAt:g,finishedAt:I}=await H(e,p.path);s.run++,await T(e,{version:p.version,name:D,startedAt:g,finishedAt:I})}catch(g){s.error++,console.error(c.error(`Error in data migration: ${g.message}`))}}}}),l=new C.Listr(n,{renderer:"verbose"});try{await l.run(),await e.$disconnect(),console.log(),j(s),console.log(),s.error&&(process.exitCode=1)}catch{process.exitCode=1,await e.$disconnect(),console.log(),j(s),console.log()}}async function B(t){let r=(0,h.getPaths)().api.dataMigrations;if(!f.default.existsSync(r))return[];let e=f.default.readdirSync(r).filter(n=>["js",".ts"].some(l=>n.endsWith(l))).map(n=>{let[l]=n.split("-");return{version:l,path:m.default.join(r,n)}}),o=(await t.rW_DataMigration.findMany({orderBy:{version:"asc"}})).map(n=>n.version.toString());return e.filter(({version:n})=>!o.includes(n)).sort(G)}function G(t,r){let e=parseInt(t.version),i=parseInt(r.version);return e>i?1:e<i?-1:0}async function H(t,r){let e=await import(r),i=new Date;return await e.default({db:t}),{startedAt:i,finishedAt:new Date}}async function T(t,{version:r,name:e,startedAt:i,finishedAt:o}){await t.rW_DataMigration.create({data:{version:r,name:e,startedAt:i,finishedAt:o}})}function j(t){t.run&&console.info(c.success(`${t.run} data migration(s) completed successfully.`)),t.error&&console.error(c.error(`${t.error} data migration(s) exited with errors.`)),t.skipped&&console.warn(c.warning(`${t.skipped} data migration(s) skipped due to previous error.`))}var f,m,C,u,h,q,$=w(()=>{"use strict";f=d(require("fs")),m=d(require("path")),C=require("listr2"),u=require("@redmix/babel-config"),h=require("@redmix/project-config");E();q="No pending data migrations run, already up-to-date."});var b=d(require("path")),S=require("dotenv-defaults"),_=require("yargs/helpers"),P=d(require("yargs/yargs")),y=require("@redmix/project-config");var v=d(require("terminal-link")),x=require("@redmix/project-config");var k="Run any outstanding Data Migrations against the database";function A(t){return t.option("import-db-client-from-dist",{type:"boolean",alias:["db-from-dist"],description:"Import the db client from dist",default:!1}).option("dist-path",{type:"string",alias:"d",description:"Path to the api dist directory",default:(0,x.getPaths)().api.dist}).epilogue(`Also see the ${(0,v.default)("Redwood CLI Reference","https://redwoodjs.com/docs/cli-commands#datamigrate-up")}`)}$();process.env.REDWOOD_ENV_FILES_LOADED||((0,S.config)({path:b.default.join((0,y.getPaths)().base,".env"),defaults:b.default.join((0,y.getPaths)().base,".env.defaults"),multiline:!0}),process.env.REDWOOD_ENV_FILES_LOADED="true");(0,P.default)((0,_.hideBin)(process.argv)).scriptName("data-migrate").command("$0",k,A,O).parse();
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { Argv } from 'yargs';
|
2
|
+
export declare const command = "install";
|
3
|
+
export declare const description = "Add the RW_DataMigration model to your schema";
|
4
|
+
export declare function builder(yargs: Argv): Argv;
|
5
|
+
export declare function handler(): Promise<void>;
|
6
|
+
//# sourceMappingURL=install.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,eAAO,MAAM,OAAO,YAAY,CAAA;AAChC,eAAO,MAAM,WAAW,kDAAkD,CAAA;AAE1E,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAOzC;AAED,wBAAsB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAK7C"}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var install_exports = {};
|
30
|
+
__export(install_exports, {
|
31
|
+
builder: () => builder,
|
32
|
+
command: () => command,
|
33
|
+
description: () => description,
|
34
|
+
handler: () => handler
|
35
|
+
});
|
36
|
+
module.exports = __toCommonJS(install_exports);
|
37
|
+
var import_terminal_link = __toESM(require("terminal-link"));
|
38
|
+
const command = "install";
|
39
|
+
const description = "Add the RW_DataMigration model to your schema";
|
40
|
+
function builder(yargs) {
|
41
|
+
return yargs.epilogue(
|
42
|
+
`Also see the ${(0, import_terminal_link.default)(
|
43
|
+
"Redwood CLI Reference",
|
44
|
+
"https://redwoodjs.com/docs/cli-commands#datamigrate-install"
|
45
|
+
)}`
|
46
|
+
);
|
47
|
+
}
|
48
|
+
async function handler() {
|
49
|
+
const { handler: dataMigrateInstallHandler } = await import("./installHandler.js");
|
50
|
+
await dataMigrateInstallHandler();
|
51
|
+
}
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
53
|
+
0 && (module.exports = {
|
54
|
+
builder,
|
55
|
+
command,
|
56
|
+
description,
|
57
|
+
handler
|
58
|
+
});
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare function handler(): Promise<void>;
|
2
|
+
export declare const RW_DATA_MIGRATION_MODEL = "model RW_DataMigration {\n version String @id\n name String\n startedAt DateTime\n finishedAt DateTime\n}";
|
3
|
+
export declare const createDatabaseMigrationCommand = "yarn rw prisma migrate dev --name create_data_migrations --create-only";
|
4
|
+
export declare const notes: string;
|
5
|
+
//# sourceMappingURL=installHandler.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"installHandler.d.ts","sourceRoot":"","sources":["../../src/commands/installHandler.ts"],"names":[],"mappings":"AAUA,wBAAsB,OAAO,kBAsD5B;AAED,eAAO,MAAM,uBAAuB,8HAMlC,CAAA;AAEF,eAAO,MAAM,8BAA8B,2EAC+B,CAAA;AAE1E,eAAO,MAAM,KAAK,QAMN,CAAA"}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var installHandler_exports = {};
|
30
|
+
__export(installHandler_exports, {
|
31
|
+
RW_DATA_MIGRATION_MODEL: () => RW_DATA_MIGRATION_MODEL,
|
32
|
+
createDatabaseMigrationCommand: () => createDatabaseMigrationCommand,
|
33
|
+
handler: () => handler,
|
34
|
+
notes: () => notes
|
35
|
+
});
|
36
|
+
module.exports = __toCommonJS(installHandler_exports);
|
37
|
+
var import_node_fs = __toESM(require("node:fs"));
|
38
|
+
var import_node_path = __toESM(require("node:path"));
|
39
|
+
var import_execa = __toESM(require("execa"));
|
40
|
+
var import_listr2 = require("listr2");
|
41
|
+
var import_project_config = require("@redmix/project-config");
|
42
|
+
var import_colors = __toESM(require("../lib/colors"));
|
43
|
+
async function handler() {
|
44
|
+
const redwoodProjectPaths = (0, import_project_config.getPaths)();
|
45
|
+
const tasks = new import_listr2.Listr(
|
46
|
+
[
|
47
|
+
{
|
48
|
+
title: "Creating the dataMigrations directory...",
|
49
|
+
task() {
|
50
|
+
import_node_fs.default.mkdirSync(redwoodProjectPaths.api.dataMigrations, {
|
51
|
+
recursive: true
|
52
|
+
});
|
53
|
+
import_node_fs.default.writeFileSync(
|
54
|
+
import_node_path.default.join(redwoodProjectPaths.api.dataMigrations, ".keep"),
|
55
|
+
""
|
56
|
+
);
|
57
|
+
}
|
58
|
+
},
|
59
|
+
{
|
60
|
+
title: "Adding the RW_DataMigration model to schema.prisma...",
|
61
|
+
task() {
|
62
|
+
const dbSchemaFilePath = redwoodProjectPaths.api.dbSchema;
|
63
|
+
const dbSchemaFileContent = import_node_fs.default.readFileSync(dbSchemaFilePath, "utf-8");
|
64
|
+
import_node_fs.default.writeFileSync(
|
65
|
+
dbSchemaFilePath,
|
66
|
+
[dbSchemaFileContent.trim(), "", RW_DATA_MIGRATION_MODEL, ""].join(
|
67
|
+
"\n"
|
68
|
+
)
|
69
|
+
);
|
70
|
+
}
|
71
|
+
},
|
72
|
+
{
|
73
|
+
title: "Creating the database migration...",
|
74
|
+
task() {
|
75
|
+
return import_execa.default.command(createDatabaseMigrationCommand, {
|
76
|
+
cwd: redwoodProjectPaths.base
|
77
|
+
}).stdout;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
],
|
81
|
+
// Not sure why, but the renderer here really matters to Jest, and 'verbose'
|
82
|
+
// is the only one I've found to work. So we set it just during testing.
|
83
|
+
{
|
84
|
+
renderer: process.env.NODE_ENV === "test" ? "verbose" : "default"
|
85
|
+
}
|
86
|
+
);
|
87
|
+
try {
|
88
|
+
await tasks.run();
|
89
|
+
console.log(notes);
|
90
|
+
} catch (e) {
|
91
|
+
process.exitCode = 1;
|
92
|
+
console.error(import_colors.default.error(e.message));
|
93
|
+
}
|
94
|
+
}
|
95
|
+
const RW_DATA_MIGRATION_MODEL = `model RW_DataMigration {
|
96
|
+
version String @id
|
97
|
+
name String
|
98
|
+
startedAt DateTime
|
99
|
+
finishedAt DateTime
|
100
|
+
}`;
|
101
|
+
const createDatabaseMigrationCommand = "yarn rw prisma migrate dev --name create_data_migrations --create-only";
|
102
|
+
const notes = [
|
103
|
+
"",
|
104
|
+
import_colors.default.warning("Don't forget to apply the migration when you're ready:"),
|
105
|
+
"",
|
106
|
+
` ${import_colors.default.bold("yarn rw prisma migrate dev")}`,
|
107
|
+
""
|
108
|
+
].join("\n");
|
109
|
+
// Annotate the CommonJS export names for ESM import in node:
|
110
|
+
0 && (module.exports = {
|
111
|
+
RW_DATA_MIGRATION_MODEL,
|
112
|
+
createDatabaseMigrationCommand,
|
113
|
+
handler,
|
114
|
+
notes
|
115
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { Argv } from 'yargs';
|
2
|
+
import type { DataMigrateUpOptions } from '../types';
|
3
|
+
export declare const command = "up";
|
4
|
+
export declare const description = "Run any outstanding Data Migrations against the database";
|
5
|
+
export declare function builder(yargs: Argv): Argv;
|
6
|
+
export declare function handler(options: DataMigrateUpOptions): Promise<void>;
|
7
|
+
//# sourceMappingURL=up.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../src/commands/up.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAEpD,eAAO,MAAM,OAAO,OAAO,CAAA;AAC3B,eAAO,MAAM,WAAW,6DACoC,CAAA;AAE5D,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAoBzC;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1E"}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var up_exports = {};
|
30
|
+
__export(up_exports, {
|
31
|
+
builder: () => builder,
|
32
|
+
command: () => command,
|
33
|
+
description: () => description,
|
34
|
+
handler: () => handler
|
35
|
+
});
|
36
|
+
module.exports = __toCommonJS(up_exports);
|
37
|
+
var import_terminal_link = __toESM(require("terminal-link"));
|
38
|
+
var import_project_config = require("@redmix/project-config");
|
39
|
+
const command = "up";
|
40
|
+
const description = "Run any outstanding Data Migrations against the database";
|
41
|
+
function builder(yargs) {
|
42
|
+
return yargs.option("import-db-client-from-dist", {
|
43
|
+
type: "boolean",
|
44
|
+
alias: ["db-from-dist"],
|
45
|
+
description: "Import the db client from dist",
|
46
|
+
default: false
|
47
|
+
}).option("dist-path", {
|
48
|
+
type: "string",
|
49
|
+
alias: "d",
|
50
|
+
description: "Path to the api dist directory",
|
51
|
+
default: (0, import_project_config.getPaths)().api.dist
|
52
|
+
}).epilogue(
|
53
|
+
`Also see the ${(0, import_terminal_link.default)(
|
54
|
+
"Redwood CLI Reference",
|
55
|
+
"https://redwoodjs.com/docs/cli-commands#datamigrate-up"
|
56
|
+
)}`
|
57
|
+
);
|
58
|
+
}
|
59
|
+
async function handler(options) {
|
60
|
+
const { handler: dataMigrateUpHandler } = await import("./upHandler.js");
|
61
|
+
await dataMigrateUpHandler(options);
|
62
|
+
}
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
64
|
+
0 && (module.exports = {
|
65
|
+
builder,
|
66
|
+
command,
|
67
|
+
description,
|
68
|
+
handler
|
69
|
+
});
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { DataMigrateUpOptions } from '../types';
|
2
|
+
export declare function handler({ importDbClientFromDist, distPath, }: DataMigrateUpOptions): Promise<void>;
|
3
|
+
export declare const NO_PENDING_MIGRATIONS_MESSAGE = "No pending data migrations run, already up-to-date.";
|
4
|
+
//# sourceMappingURL=upHandler.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"upHandler.d.ts","sourceRoot":"","sources":["../../src/commands/upHandler.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAiB,MAAM,UAAU,CAAA;AAEnE,wBAAsB,OAAO,CAAC,EAC5B,sBAAsB,EACtB,QAAQ,GACT,EAAE,oBAAoB,iBA2GtB;AA4ED,eAAO,MAAM,6BAA6B,wDACa,CAAA"}
|
@@ -0,0 +1,214 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var upHandler_exports = {};
|
30
|
+
__export(upHandler_exports, {
|
31
|
+
NO_PENDING_MIGRATIONS_MESSAGE: () => NO_PENDING_MIGRATIONS_MESSAGE,
|
32
|
+
handler: () => handler
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(upHandler_exports);
|
35
|
+
var import_fs = __toESM(require("fs"));
|
36
|
+
var import_path = __toESM(require("path"));
|
37
|
+
var import_listr2 = require("listr2");
|
38
|
+
var import_babel_config = require("@redmix/babel-config");
|
39
|
+
var import_project_config = require("@redmix/project-config");
|
40
|
+
var import_colors = __toESM(require("../lib/colors"));
|
41
|
+
async function handler({
|
42
|
+
importDbClientFromDist,
|
43
|
+
distPath
|
44
|
+
}) {
|
45
|
+
let db;
|
46
|
+
let requireHookRegistered = false;
|
47
|
+
if (importDbClientFromDist) {
|
48
|
+
if (!import_fs.default.existsSync(distPath)) {
|
49
|
+
console.warn(
|
50
|
+
`Can't find api dist at ${distPath}. You may need to build first: yarn rw build api`
|
51
|
+
);
|
52
|
+
process.exitCode = 1;
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
const distLibDbPath = import_path.default.join(distPath, "lib", "db.js");
|
56
|
+
if (!import_fs.default.existsSync(distLibDbPath)) {
|
57
|
+
console.error(
|
58
|
+
`Can't find db.js at ${distLibDbPath}. Redwood expects the db.js file to be in the ${import_path.default.join(
|
59
|
+
distPath,
|
60
|
+
"lib"
|
61
|
+
)} directory`
|
62
|
+
);
|
63
|
+
process.exitCode = 1;
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
db = (await import(distLibDbPath)).db;
|
67
|
+
} else {
|
68
|
+
(0, import_babel_config.registerApiSideBabelHook)();
|
69
|
+
requireHookRegistered = true;
|
70
|
+
db = require(import_path.default.join((0, import_project_config.getPaths)().api.lib, "db")).db;
|
71
|
+
}
|
72
|
+
const pendingDataMigrations = await getPendingDataMigrations(db);
|
73
|
+
if (!pendingDataMigrations.length) {
|
74
|
+
console.info(import_colors.default.success(`
|
75
|
+
${NO_PENDING_MIGRATIONS_MESSAGE}
|
76
|
+
`));
|
77
|
+
process.exitCode = 0;
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
const counters = { run: 0, skipped: 0, error: 0 };
|
81
|
+
const dataMigrationTasks = pendingDataMigrations.map((dataMigration) => {
|
82
|
+
const dataMigrationName = import_path.default.basename(dataMigration.path, ".js");
|
83
|
+
return {
|
84
|
+
title: dataMigrationName,
|
85
|
+
skip() {
|
86
|
+
if (counters.error > 0) {
|
87
|
+
counters.skipped++;
|
88
|
+
return true;
|
89
|
+
} else {
|
90
|
+
return false;
|
91
|
+
}
|
92
|
+
},
|
93
|
+
async task() {
|
94
|
+
if (!requireHookRegistered) {
|
95
|
+
(0, import_babel_config.registerApiSideBabelHook)();
|
96
|
+
}
|
97
|
+
try {
|
98
|
+
const { startedAt, finishedAt } = await runDataMigration(
|
99
|
+
db,
|
100
|
+
dataMigration.path
|
101
|
+
);
|
102
|
+
counters.run++;
|
103
|
+
await recordDataMigration(db, {
|
104
|
+
version: dataMigration.version,
|
105
|
+
name: dataMigrationName,
|
106
|
+
startedAt,
|
107
|
+
finishedAt
|
108
|
+
});
|
109
|
+
} catch (e) {
|
110
|
+
counters.error++;
|
111
|
+
console.error(
|
112
|
+
import_colors.default.error(`Error in data migration: ${e.message}`)
|
113
|
+
);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
};
|
117
|
+
});
|
118
|
+
const tasks = new import_listr2.Listr(dataMigrationTasks, {
|
119
|
+
renderer: "verbose"
|
120
|
+
});
|
121
|
+
try {
|
122
|
+
await tasks.run();
|
123
|
+
await db.$disconnect();
|
124
|
+
console.log();
|
125
|
+
reportDataMigrations(counters);
|
126
|
+
console.log();
|
127
|
+
if (counters.error) {
|
128
|
+
process.exitCode = 1;
|
129
|
+
}
|
130
|
+
} catch {
|
131
|
+
process.exitCode = 1;
|
132
|
+
await db.$disconnect();
|
133
|
+
console.log();
|
134
|
+
reportDataMigrations(counters);
|
135
|
+
console.log();
|
136
|
+
}
|
137
|
+
}
|
138
|
+
async function getPendingDataMigrations(db) {
|
139
|
+
const dataMigrationsPath = (0, import_project_config.getPaths)().api.dataMigrations;
|
140
|
+
if (!import_fs.default.existsSync(dataMigrationsPath)) {
|
141
|
+
return [];
|
142
|
+
}
|
143
|
+
const dataMigrations = import_fs.default.readdirSync(dataMigrationsPath).filter(
|
144
|
+
(dataMigrationFileName) => ["js", ".ts"].some(
|
145
|
+
(extension) => dataMigrationFileName.endsWith(extension)
|
146
|
+
)
|
147
|
+
).map((dataMigrationFileName) => {
|
148
|
+
const [version] = dataMigrationFileName.split("-");
|
149
|
+
return {
|
150
|
+
version,
|
151
|
+
path: import_path.default.join(dataMigrationsPath, dataMigrationFileName)
|
152
|
+
};
|
153
|
+
});
|
154
|
+
const ranDataMigrations = await db.rW_DataMigration.findMany(
|
155
|
+
{
|
156
|
+
orderBy: { version: "asc" }
|
157
|
+
}
|
158
|
+
);
|
159
|
+
const ranDataMigrationVersions = ranDataMigrations.map(
|
160
|
+
(dataMigration) => dataMigration.version.toString()
|
161
|
+
);
|
162
|
+
const pendingDataMigrations = dataMigrations.filter(({ version }) => {
|
163
|
+
return !ranDataMigrationVersions.includes(version);
|
164
|
+
}).sort(sortDataMigrationsByVersion);
|
165
|
+
return pendingDataMigrations;
|
166
|
+
}
|
167
|
+
function sortDataMigrationsByVersion(dataMigrationA, dataMigrationB) {
|
168
|
+
const aVersion = parseInt(dataMigrationA.version);
|
169
|
+
const bVersion = parseInt(dataMigrationB.version);
|
170
|
+
if (aVersion > bVersion) {
|
171
|
+
return 1;
|
172
|
+
}
|
173
|
+
if (aVersion < bVersion) {
|
174
|
+
return -1;
|
175
|
+
}
|
176
|
+
return 0;
|
177
|
+
}
|
178
|
+
async function runDataMigration(db, dataMigrationPath) {
|
179
|
+
const dataMigration = await import(dataMigrationPath);
|
180
|
+
const startedAt = /* @__PURE__ */ new Date();
|
181
|
+
await dataMigration.default({ db });
|
182
|
+
const finishedAt = /* @__PURE__ */ new Date();
|
183
|
+
return { startedAt, finishedAt };
|
184
|
+
}
|
185
|
+
const NO_PENDING_MIGRATIONS_MESSAGE = "No pending data migrations run, already up-to-date.";
|
186
|
+
async function recordDataMigration(db, { version, name, startedAt, finishedAt }) {
|
187
|
+
await db.rW_DataMigration.create({
|
188
|
+
data: { version, name, startedAt, finishedAt }
|
189
|
+
});
|
190
|
+
}
|
191
|
+
function reportDataMigrations(counters) {
|
192
|
+
if (counters.run) {
|
193
|
+
console.info(
|
194
|
+
import_colors.default.success(`${counters.run} data migration(s) completed successfully.`)
|
195
|
+
);
|
196
|
+
}
|
197
|
+
if (counters.error) {
|
198
|
+
console.error(
|
199
|
+
import_colors.default.error(`${counters.error} data migration(s) exited with errors.`)
|
200
|
+
);
|
201
|
+
}
|
202
|
+
if (counters.skipped) {
|
203
|
+
console.warn(
|
204
|
+
import_colors.default.warning(
|
205
|
+
`${counters.skipped} data migration(s) skipped due to previous error.`
|
206
|
+
)
|
207
|
+
);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
// Annotate the CommonJS export names for ESM import in node:
|
211
|
+
0 && (module.exports = {
|
212
|
+
NO_PENDING_MIGRATIONS_MESSAGE,
|
213
|
+
handler
|
214
|
+
});
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Argv } from 'yargs';
|
2
|
+
declare function builder(yargs: Argv): void;
|
3
|
+
export declare const commands: {
|
4
|
+
command: string;
|
5
|
+
aliases: string[];
|
6
|
+
description: string;
|
7
|
+
builder: typeof builder;
|
8
|
+
}[];
|
9
|
+
export {};
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAmBjC,iBAAS,OAAO,CAAC,KAAK,EAAE,IAAI,QAW3B;AAED,eAAO,MAAM,QAAQ;;;;;GAOpB,CAAA"}
|
package/dist/index.js
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var index_exports = {};
|
30
|
+
__export(index_exports, {
|
31
|
+
commands: () => commands
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(index_exports);
|
34
|
+
var import_terminal_link = __toESM(require("terminal-link"));
|
35
|
+
var import_install = require("./commands/install");
|
36
|
+
var import_up = require("./commands/up");
|
37
|
+
const command = "data-migrate <command>";
|
38
|
+
const aliases = ["dataMigrate", "dm"];
|
39
|
+
const description = "Migrate the data in your database";
|
40
|
+
function builder(yargs) {
|
41
|
+
yargs.command(import_install.command, import_install.description, import_install.builder, import_install.handler).command(import_up.command, import_up.description, import_up.builder, import_up.handler).epilogue(
|
42
|
+
`Also see the ${(0, import_terminal_link.default)(
|
43
|
+
"Redwood CLI Reference",
|
44
|
+
"https://redwoodjs.com/docs/cli-commands#datamigrate"
|
45
|
+
)}`
|
46
|
+
);
|
47
|
+
}
|
48
|
+
const commands = [
|
49
|
+
{
|
50
|
+
command,
|
51
|
+
aliases,
|
52
|
+
description,
|
53
|
+
builder
|
54
|
+
}
|
55
|
+
];
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
57
|
+
0 && (module.exports = {
|
58
|
+
commands
|
59
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import chalk from 'chalk';
|
2
|
+
declare const _default: {
|
3
|
+
error: chalk.Chalk;
|
4
|
+
warning: chalk.Chalk;
|
5
|
+
highlight: chalk.Chalk;
|
6
|
+
success: chalk.Chalk;
|
7
|
+
info: chalk.Chalk;
|
8
|
+
bold: chalk.Chalk;
|
9
|
+
underline: chalk.Chalk;
|
10
|
+
note: chalk.Chalk;
|
11
|
+
tip: chalk.Chalk;
|
12
|
+
important: chalk.Chalk;
|
13
|
+
caution: chalk.Chalk;
|
14
|
+
link: chalk.Chalk;
|
15
|
+
};
|
16
|
+
export default _default;
|
17
|
+
//# sourceMappingURL=colors.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/lib/colors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;;;;;;;;;;;;;;;AAEzB,wBAaC"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var colors_exports = {};
|
30
|
+
__export(colors_exports, {
|
31
|
+
default: () => colors_default
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(colors_exports);
|
34
|
+
var import_chalk = __toESM(require("chalk"));
|
35
|
+
var colors_default = {
|
36
|
+
error: import_chalk.default.bold.red,
|
37
|
+
warning: import_chalk.default.hex("#ffa500"),
|
38
|
+
highlight: import_chalk.default.hex("#ffa500"),
|
39
|
+
success: import_chalk.default.green,
|
40
|
+
info: import_chalk.default.grey,
|
41
|
+
bold: import_chalk.default.bold,
|
42
|
+
underline: import_chalk.default.underline,
|
43
|
+
note: import_chalk.default.blue,
|
44
|
+
tip: import_chalk.default.green,
|
45
|
+
important: import_chalk.default.magenta,
|
46
|
+
caution: import_chalk.default.red,
|
47
|
+
link: import_chalk.default.hex("#e8e8e8")
|
48
|
+
};
|
package/dist/types.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,sBAAsB,EAAE,OAAO,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,IAAI,CAAA;IACf,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA"}
|
package/package.json
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
{
|
2
|
+
"name": "@redmix/cli-data-migrate",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"repository": {
|
5
|
+
"type": "git",
|
6
|
+
"url": "git+https://github.com/redmix-run/redmix.git",
|
7
|
+
"directory": "packages/cli-packages/dataMigrate"
|
8
|
+
},
|
9
|
+
"license": "MIT",
|
10
|
+
"exports": "./dist/index.js",
|
11
|
+
"types": "./dist/index.d.ts",
|
12
|
+
"bin": {
|
13
|
+
"up": "./dist/bin.js"
|
14
|
+
},
|
15
|
+
"files": [
|
16
|
+
"dist"
|
17
|
+
],
|
18
|
+
"scripts": {
|
19
|
+
"build": "tsx ./build.mts && yarn build:types",
|
20
|
+
"build:pack": "yarn pack -o redmix-cli-data-migrate.tgz",
|
21
|
+
"build:types": "tsc --build --verbose",
|
22
|
+
"prepublishOnly": "NODE_ENV=production yarn build",
|
23
|
+
"test": "yarn test:unit && yarn test:dist",
|
24
|
+
"test:dist": "yarn vitest run ./dist.test.ts",
|
25
|
+
"test:unit": "yarn vitest run src/"
|
26
|
+
},
|
27
|
+
"dependencies": {
|
28
|
+
"@redmix/babel-config": "0.0.1",
|
29
|
+
"@redmix/project-config": "0.0.1",
|
30
|
+
"chalk": "4.1.2",
|
31
|
+
"dotenv-defaults": "5.0.2",
|
32
|
+
"execa": "5.1.1",
|
33
|
+
"fs-extra": "11.2.0",
|
34
|
+
"listr2": "7.0.2",
|
35
|
+
"terminal-link": "2.1.1",
|
36
|
+
"yargs": "17.7.2"
|
37
|
+
},
|
38
|
+
"devDependencies": {
|
39
|
+
"@prisma/client": "5.20.0",
|
40
|
+
"@redmix/framework-tools": "0.0.1",
|
41
|
+
"@types/fs-extra": "11.0.4",
|
42
|
+
"@types/yargs": "17.0.33",
|
43
|
+
"memfs": "4.17.0",
|
44
|
+
"tsx": "4.19.3",
|
45
|
+
"typescript": "5.6.2",
|
46
|
+
"vitest": "2.1.9"
|
47
|
+
},
|
48
|
+
"publishConfig": {
|
49
|
+
"access": "public"
|
50
|
+
},
|
51
|
+
"gitHead": "688027c97502c500ebbede9cdc7cc51545a8dcf3"
|
52
|
+
}
|