@memberjunction/cli 5.30.1 → 5.32.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/commands/migrate/convert.d.ts +39 -0
- package/dist/commands/migrate/convert.d.ts.map +1 -0
- package/dist/commands/migrate/convert.js +207 -0
- package/dist/commands/migrate/convert.js.map +1 -0
- package/dist/commands/migrate/create.d.ts +42 -0
- package/dist/commands/migrate/create.d.ts.map +1 -0
- package/dist/commands/migrate/create.js +174 -0
- package/dist/commands/migrate/create.js.map +1 -0
- package/dist/commands/sync/pull.d.ts +2 -0
- package/dist/commands/sync/pull.d.ts.map +1 -1
- package/dist/commands/sync/pull.js +19 -2
- package/dist/commands/sync/pull.js.map +1 -1
- package/dist/commands/sync/push.d.ts +1 -0
- package/dist/commands/sync/push.d.ts.map +1 -1
- package/dist/commands/sync/push.js +32 -3
- package/dist/commands/sync/push.js.map +1 -1
- package/dist/commands/translate-sql/index.js +2 -2
- package/dist/commands/translate-sql/index.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +58 -13
- package/dist/config.js.map +1 -1
- package/dist/light-commands.d.ts.map +1 -1
- package/dist/light-commands.js +2 -0
- package/dist/light-commands.js.map +1 -1
- package/oclif.manifest.json +349 -185
- package/package.json +17 -15
package/oclif.manifest.json
CHANGED
|
@@ -1454,6 +1454,151 @@
|
|
|
1454
1454
|
"index.js"
|
|
1455
1455
|
]
|
|
1456
1456
|
},
|
|
1457
|
+
"migrate:convert": {
|
|
1458
|
+
"aliases": [],
|
|
1459
|
+
"args": {},
|
|
1460
|
+
"description": "Convert T-SQL migrations to PostgreSQL using the BatchConverter pipeline",
|
|
1461
|
+
"examples": [
|
|
1462
|
+
"<%= config.bin %> migrate convert",
|
|
1463
|
+
"<%= config.bin %> migrate convert --dry-run",
|
|
1464
|
+
"<%= config.bin %> migrate convert --file V202604060452__v5.24.x__KnowledgeHub.sql",
|
|
1465
|
+
"<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
|
|
1466
|
+
"<%= config.bin %> migrate convert --verbose"
|
|
1467
|
+
],
|
|
1468
|
+
"flags": {
|
|
1469
|
+
"source-dir": {
|
|
1470
|
+
"description": "Source T-SQL migrations directory",
|
|
1471
|
+
"name": "source-dir",
|
|
1472
|
+
"default": "./migrations/v5",
|
|
1473
|
+
"hasDynamicHelp": false,
|
|
1474
|
+
"multiple": false,
|
|
1475
|
+
"type": "option"
|
|
1476
|
+
},
|
|
1477
|
+
"output-dir": {
|
|
1478
|
+
"description": "Output PG migrations directory",
|
|
1479
|
+
"name": "output-dir",
|
|
1480
|
+
"default": "./migrations-pg/v5",
|
|
1481
|
+
"hasDynamicHelp": false,
|
|
1482
|
+
"multiple": false,
|
|
1483
|
+
"type": "option"
|
|
1484
|
+
},
|
|
1485
|
+
"file": {
|
|
1486
|
+
"description": "Convert a specific file (filename only, looked up in source-dir)",
|
|
1487
|
+
"name": "file",
|
|
1488
|
+
"hasDynamicHelp": false,
|
|
1489
|
+
"multiple": false,
|
|
1490
|
+
"type": "option"
|
|
1491
|
+
},
|
|
1492
|
+
"schema": {
|
|
1493
|
+
"description": "Target schema name",
|
|
1494
|
+
"name": "schema",
|
|
1495
|
+
"default": "__mj",
|
|
1496
|
+
"hasDynamicHelp": false,
|
|
1497
|
+
"multiple": false,
|
|
1498
|
+
"type": "option"
|
|
1499
|
+
},
|
|
1500
|
+
"dry-run": {
|
|
1501
|
+
"description": "Show what would be converted without writing files",
|
|
1502
|
+
"name": "dry-run",
|
|
1503
|
+
"allowNo": false,
|
|
1504
|
+
"type": "boolean"
|
|
1505
|
+
},
|
|
1506
|
+
"no-header": {
|
|
1507
|
+
"description": "Skip PG header (extensions, schema, implicit cast)",
|
|
1508
|
+
"name": "no-header",
|
|
1509
|
+
"allowNo": false,
|
|
1510
|
+
"type": "boolean"
|
|
1511
|
+
},
|
|
1512
|
+
"verbose": {
|
|
1513
|
+
"char": "v",
|
|
1514
|
+
"description": "Show per-statement progress",
|
|
1515
|
+
"name": "verbose",
|
|
1516
|
+
"allowNo": false,
|
|
1517
|
+
"type": "boolean"
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
"hasDynamicHelp": false,
|
|
1521
|
+
"hiddenAliases": [],
|
|
1522
|
+
"id": "migrate:convert",
|
|
1523
|
+
"pluginAlias": "@memberjunction/cli",
|
|
1524
|
+
"pluginName": "@memberjunction/cli",
|
|
1525
|
+
"pluginType": "core",
|
|
1526
|
+
"strict": true,
|
|
1527
|
+
"enableJsonFlag": false,
|
|
1528
|
+
"isESM": true,
|
|
1529
|
+
"relativePath": [
|
|
1530
|
+
"dist",
|
|
1531
|
+
"commands",
|
|
1532
|
+
"migrate",
|
|
1533
|
+
"convert.js"
|
|
1534
|
+
]
|
|
1535
|
+
},
|
|
1536
|
+
"migrate:create": {
|
|
1537
|
+
"aliases": [],
|
|
1538
|
+
"args": {
|
|
1539
|
+
"description": {
|
|
1540
|
+
"description": "Short description (will be converted to PascalCase with underscores)",
|
|
1541
|
+
"name": "description",
|
|
1542
|
+
"required": true
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
"description": "Scaffold a new migration file for the current database platform",
|
|
1546
|
+
"examples": [
|
|
1547
|
+
"<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
|
|
1548
|
+
"<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
|
|
1549
|
+
"<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
|
|
1550
|
+
],
|
|
1551
|
+
"flags": {
|
|
1552
|
+
"version": {
|
|
1553
|
+
"char": "v",
|
|
1554
|
+
"description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
|
|
1555
|
+
"name": "version",
|
|
1556
|
+
"hasDynamicHelp": false,
|
|
1557
|
+
"multiple": false,
|
|
1558
|
+
"type": "option"
|
|
1559
|
+
},
|
|
1560
|
+
"platform": {
|
|
1561
|
+
"char": "p",
|
|
1562
|
+
"description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
|
|
1563
|
+
"name": "platform",
|
|
1564
|
+
"hasDynamicHelp": false,
|
|
1565
|
+
"multiple": false,
|
|
1566
|
+
"options": [
|
|
1567
|
+
"sqlserver",
|
|
1568
|
+
"postgresql"
|
|
1569
|
+
],
|
|
1570
|
+
"type": "option"
|
|
1571
|
+
},
|
|
1572
|
+
"dir": {
|
|
1573
|
+
"description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
|
|
1574
|
+
"name": "dir",
|
|
1575
|
+
"hasDynamicHelp": false,
|
|
1576
|
+
"multiple": false,
|
|
1577
|
+
"type": "option"
|
|
1578
|
+
},
|
|
1579
|
+
"x-x": {
|
|
1580
|
+
"description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
|
|
1581
|
+
"name": "x-x",
|
|
1582
|
+
"allowNo": false,
|
|
1583
|
+
"type": "boolean"
|
|
1584
|
+
}
|
|
1585
|
+
},
|
|
1586
|
+
"hasDynamicHelp": false,
|
|
1587
|
+
"hiddenAliases": [],
|
|
1588
|
+
"id": "migrate:create",
|
|
1589
|
+
"pluginAlias": "@memberjunction/cli",
|
|
1590
|
+
"pluginName": "@memberjunction/cli",
|
|
1591
|
+
"pluginType": "core",
|
|
1592
|
+
"strict": true,
|
|
1593
|
+
"enableJsonFlag": false,
|
|
1594
|
+
"isESM": true,
|
|
1595
|
+
"relativePath": [
|
|
1596
|
+
"dist",
|
|
1597
|
+
"commands",
|
|
1598
|
+
"migrate",
|
|
1599
|
+
"create.js"
|
|
1600
|
+
]
|
|
1601
|
+
},
|
|
1457
1602
|
"migrate": {
|
|
1458
1603
|
"aliases": [],
|
|
1459
1604
|
"args": {},
|
|
@@ -1793,6 +1938,91 @@
|
|
|
1793
1938
|
"index.js"
|
|
1794
1939
|
]
|
|
1795
1940
|
},
|
|
1941
|
+
"sql-convert": {
|
|
1942
|
+
"aliases": [],
|
|
1943
|
+
"args": {
|
|
1944
|
+
"source": {
|
|
1945
|
+
"description": "Source SQL file path",
|
|
1946
|
+
"name": "source",
|
|
1947
|
+
"required": true
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
"description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
|
|
1951
|
+
"examples": [
|
|
1952
|
+
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
|
|
1953
|
+
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
|
|
1954
|
+
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
|
|
1955
|
+
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
|
|
1956
|
+
],
|
|
1957
|
+
"flags": {
|
|
1958
|
+
"from": {
|
|
1959
|
+
"description": "Source SQL dialect",
|
|
1960
|
+
"name": "from",
|
|
1961
|
+
"required": true,
|
|
1962
|
+
"hasDynamicHelp": false,
|
|
1963
|
+
"multiple": false,
|
|
1964
|
+
"type": "option"
|
|
1965
|
+
},
|
|
1966
|
+
"to": {
|
|
1967
|
+
"description": "Target SQL dialect",
|
|
1968
|
+
"name": "to",
|
|
1969
|
+
"required": true,
|
|
1970
|
+
"hasDynamicHelp": false,
|
|
1971
|
+
"multiple": false,
|
|
1972
|
+
"type": "option"
|
|
1973
|
+
},
|
|
1974
|
+
"output": {
|
|
1975
|
+
"char": "o",
|
|
1976
|
+
"description": "Output file path (default: <source>.converted.<ext>)",
|
|
1977
|
+
"name": "output",
|
|
1978
|
+
"hasDynamicHelp": false,
|
|
1979
|
+
"multiple": false,
|
|
1980
|
+
"type": "option"
|
|
1981
|
+
},
|
|
1982
|
+
"schema": {
|
|
1983
|
+
"description": "Target schema name",
|
|
1984
|
+
"name": "schema",
|
|
1985
|
+
"default": "__mj",
|
|
1986
|
+
"hasDynamicHelp": false,
|
|
1987
|
+
"multiple": false,
|
|
1988
|
+
"type": "option"
|
|
1989
|
+
},
|
|
1990
|
+
"no-header": {
|
|
1991
|
+
"description": "Skip PG header (extensions, schema, implicit cast)",
|
|
1992
|
+
"name": "no-header",
|
|
1993
|
+
"allowNo": false,
|
|
1994
|
+
"type": "boolean"
|
|
1995
|
+
},
|
|
1996
|
+
"no-post-process": {
|
|
1997
|
+
"description": "Skip post-processing pass",
|
|
1998
|
+
"name": "no-post-process",
|
|
1999
|
+
"allowNo": false,
|
|
2000
|
+
"type": "boolean"
|
|
2001
|
+
},
|
|
2002
|
+
"verbose": {
|
|
2003
|
+
"char": "v",
|
|
2004
|
+
"description": "Show per-statement progress and detailed report",
|
|
2005
|
+
"name": "verbose",
|
|
2006
|
+
"allowNo": false,
|
|
2007
|
+
"type": "boolean"
|
|
2008
|
+
}
|
|
2009
|
+
},
|
|
2010
|
+
"hasDynamicHelp": false,
|
|
2011
|
+
"hiddenAliases": [],
|
|
2012
|
+
"id": "sql-convert",
|
|
2013
|
+
"pluginAlias": "@memberjunction/cli",
|
|
2014
|
+
"pluginName": "@memberjunction/cli",
|
|
2015
|
+
"pluginType": "core",
|
|
2016
|
+
"strict": true,
|
|
2017
|
+
"enableJsonFlag": false,
|
|
2018
|
+
"isESM": true,
|
|
2019
|
+
"relativePath": [
|
|
2020
|
+
"dist",
|
|
2021
|
+
"commands",
|
|
2022
|
+
"sql-convert",
|
|
2023
|
+
"index.js"
|
|
2024
|
+
]
|
|
2025
|
+
},
|
|
1796
2026
|
"sync:file-reset": {
|
|
1797
2027
|
"aliases": [],
|
|
1798
2028
|
"args": {},
|
|
@@ -1996,6 +2226,19 @@
|
|
|
1996
2226
|
"hasDynamicHelp": false,
|
|
1997
2227
|
"multiple": false,
|
|
1998
2228
|
"type": "option"
|
|
2229
|
+
},
|
|
2230
|
+
"incremental": {
|
|
2231
|
+
"description": "Only pull records updated since last successful pull",
|
|
2232
|
+
"name": "incremental",
|
|
2233
|
+
"allowNo": false,
|
|
2234
|
+
"type": "boolean"
|
|
2235
|
+
},
|
|
2236
|
+
"since": {
|
|
2237
|
+
"description": "Only pull records updated after this ISO 8601 timestamp (e.g., 2026-04-07T10:00:00Z)",
|
|
2238
|
+
"name": "since",
|
|
2239
|
+
"hasDynamicHelp": false,
|
|
2240
|
+
"multiple": false,
|
|
2241
|
+
"type": "option"
|
|
1999
2242
|
}
|
|
2000
2243
|
},
|
|
2001
2244
|
"hasDynamicHelp": false,
|
|
@@ -2084,6 +2327,12 @@
|
|
|
2084
2327
|
"hasDynamicHelp": false,
|
|
2085
2328
|
"multiple": false,
|
|
2086
2329
|
"type": "option"
|
|
2330
|
+
},
|
|
2331
|
+
"incremental": {
|
|
2332
|
+
"description": "Skip unchanged files using stored checksums from last push",
|
|
2333
|
+
"name": "incremental",
|
|
2334
|
+
"allowNo": false,
|
|
2335
|
+
"type": "boolean"
|
|
2087
2336
|
}
|
|
2088
2337
|
},
|
|
2089
2338
|
"hasDynamicHelp": false,
|
|
@@ -2267,190 +2516,6 @@
|
|
|
2267
2516
|
"watch.js"
|
|
2268
2517
|
]
|
|
2269
2518
|
},
|
|
2270
|
-
"sql-convert": {
|
|
2271
|
-
"aliases": [],
|
|
2272
|
-
"args": {
|
|
2273
|
-
"source": {
|
|
2274
|
-
"description": "Source SQL file path",
|
|
2275
|
-
"name": "source",
|
|
2276
|
-
"required": true
|
|
2277
|
-
}
|
|
2278
|
-
},
|
|
2279
|
-
"description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
|
|
2280
|
-
"examples": [
|
|
2281
|
-
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
|
|
2282
|
-
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
|
|
2283
|
-
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
|
|
2284
|
-
"<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
|
|
2285
|
-
],
|
|
2286
|
-
"flags": {
|
|
2287
|
-
"from": {
|
|
2288
|
-
"description": "Source SQL dialect",
|
|
2289
|
-
"name": "from",
|
|
2290
|
-
"required": true,
|
|
2291
|
-
"hasDynamicHelp": false,
|
|
2292
|
-
"multiple": false,
|
|
2293
|
-
"type": "option"
|
|
2294
|
-
},
|
|
2295
|
-
"to": {
|
|
2296
|
-
"description": "Target SQL dialect",
|
|
2297
|
-
"name": "to",
|
|
2298
|
-
"required": true,
|
|
2299
|
-
"hasDynamicHelp": false,
|
|
2300
|
-
"multiple": false,
|
|
2301
|
-
"type": "option"
|
|
2302
|
-
},
|
|
2303
|
-
"output": {
|
|
2304
|
-
"char": "o",
|
|
2305
|
-
"description": "Output file path (default: <source>.converted.<ext>)",
|
|
2306
|
-
"name": "output",
|
|
2307
|
-
"hasDynamicHelp": false,
|
|
2308
|
-
"multiple": false,
|
|
2309
|
-
"type": "option"
|
|
2310
|
-
},
|
|
2311
|
-
"schema": {
|
|
2312
|
-
"description": "Target schema name",
|
|
2313
|
-
"name": "schema",
|
|
2314
|
-
"default": "__mj",
|
|
2315
|
-
"hasDynamicHelp": false,
|
|
2316
|
-
"multiple": false,
|
|
2317
|
-
"type": "option"
|
|
2318
|
-
},
|
|
2319
|
-
"no-header": {
|
|
2320
|
-
"description": "Skip PG header (extensions, schema, implicit cast)",
|
|
2321
|
-
"name": "no-header",
|
|
2322
|
-
"allowNo": false,
|
|
2323
|
-
"type": "boolean"
|
|
2324
|
-
},
|
|
2325
|
-
"no-post-process": {
|
|
2326
|
-
"description": "Skip post-processing pass",
|
|
2327
|
-
"name": "no-post-process",
|
|
2328
|
-
"allowNo": false,
|
|
2329
|
-
"type": "boolean"
|
|
2330
|
-
},
|
|
2331
|
-
"verbose": {
|
|
2332
|
-
"char": "v",
|
|
2333
|
-
"description": "Show per-statement progress and detailed report",
|
|
2334
|
-
"name": "verbose",
|
|
2335
|
-
"allowNo": false,
|
|
2336
|
-
"type": "boolean"
|
|
2337
|
-
}
|
|
2338
|
-
},
|
|
2339
|
-
"hasDynamicHelp": false,
|
|
2340
|
-
"hiddenAliases": [],
|
|
2341
|
-
"id": "sql-convert",
|
|
2342
|
-
"pluginAlias": "@memberjunction/cli",
|
|
2343
|
-
"pluginName": "@memberjunction/cli",
|
|
2344
|
-
"pluginType": "core",
|
|
2345
|
-
"strict": true,
|
|
2346
|
-
"enableJsonFlag": false,
|
|
2347
|
-
"isESM": true,
|
|
2348
|
-
"relativePath": [
|
|
2349
|
-
"dist",
|
|
2350
|
-
"commands",
|
|
2351
|
-
"sql-convert",
|
|
2352
|
-
"index.js"
|
|
2353
|
-
]
|
|
2354
|
-
},
|
|
2355
|
-
"translate-sql": {
|
|
2356
|
-
"aliases": [],
|
|
2357
|
-
"args": {},
|
|
2358
|
-
"description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
|
|
2359
|
-
"examples": [
|
|
2360
|
-
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
|
|
2361
|
-
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
|
|
2362
|
-
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
|
|
2363
|
-
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
|
|
2364
|
-
],
|
|
2365
|
-
"flags": {
|
|
2366
|
-
"from": {
|
|
2367
|
-
"description": "Source SQL dialect",
|
|
2368
|
-
"name": "from",
|
|
2369
|
-
"required": true,
|
|
2370
|
-
"hasDynamicHelp": false,
|
|
2371
|
-
"multiple": false,
|
|
2372
|
-
"options": [
|
|
2373
|
-
"sqlserver",
|
|
2374
|
-
"postgresql"
|
|
2375
|
-
],
|
|
2376
|
-
"type": "option"
|
|
2377
|
-
},
|
|
2378
|
-
"to": {
|
|
2379
|
-
"description": "Target SQL dialect",
|
|
2380
|
-
"name": "to",
|
|
2381
|
-
"required": true,
|
|
2382
|
-
"hasDynamicHelp": false,
|
|
2383
|
-
"multiple": false,
|
|
2384
|
-
"options": [
|
|
2385
|
-
"sqlserver",
|
|
2386
|
-
"postgresql"
|
|
2387
|
-
],
|
|
2388
|
-
"type": "option"
|
|
2389
|
-
},
|
|
2390
|
-
"scope": {
|
|
2391
|
-
"description": "What to scan for translation",
|
|
2392
|
-
"name": "scope",
|
|
2393
|
-
"default": "all",
|
|
2394
|
-
"hasDynamicHelp": false,
|
|
2395
|
-
"multiple": false,
|
|
2396
|
-
"options": [
|
|
2397
|
-
"queries",
|
|
2398
|
-
"views",
|
|
2399
|
-
"filters",
|
|
2400
|
-
"all"
|
|
2401
|
-
],
|
|
2402
|
-
"type": "option"
|
|
2403
|
-
},
|
|
2404
|
-
"sql": {
|
|
2405
|
-
"description": "Translate a single SQL fragment (inline mode)",
|
|
2406
|
-
"name": "sql",
|
|
2407
|
-
"hasDynamicHelp": false,
|
|
2408
|
-
"multiple": false,
|
|
2409
|
-
"type": "option"
|
|
2410
|
-
},
|
|
2411
|
-
"dry-run": {
|
|
2412
|
-
"description": "Show what would be translated without making changes",
|
|
2413
|
-
"name": "dry-run",
|
|
2414
|
-
"allowNo": false,
|
|
2415
|
-
"type": "boolean"
|
|
2416
|
-
},
|
|
2417
|
-
"review": {
|
|
2418
|
-
"description": "Generate review report only (no writes to database)",
|
|
2419
|
-
"name": "review",
|
|
2420
|
-
"allowNo": false,
|
|
2421
|
-
"type": "boolean"
|
|
2422
|
-
},
|
|
2423
|
-
"output": {
|
|
2424
|
-
"char": "o",
|
|
2425
|
-
"description": "Output directory for the translation report",
|
|
2426
|
-
"name": "output",
|
|
2427
|
-
"hasDynamicHelp": false,
|
|
2428
|
-
"multiple": false,
|
|
2429
|
-
"type": "option"
|
|
2430
|
-
},
|
|
2431
|
-
"force": {
|
|
2432
|
-
"description": "Re-translate even if platform variants already exist",
|
|
2433
|
-
"name": "force",
|
|
2434
|
-
"allowNo": false,
|
|
2435
|
-
"type": "boolean"
|
|
2436
|
-
}
|
|
2437
|
-
},
|
|
2438
|
-
"hasDynamicHelp": false,
|
|
2439
|
-
"hiddenAliases": [],
|
|
2440
|
-
"id": "translate-sql",
|
|
2441
|
-
"pluginAlias": "@memberjunction/cli",
|
|
2442
|
-
"pluginName": "@memberjunction/cli",
|
|
2443
|
-
"pluginType": "core",
|
|
2444
|
-
"strict": true,
|
|
2445
|
-
"enableJsonFlag": false,
|
|
2446
|
-
"isESM": true,
|
|
2447
|
-
"relativePath": [
|
|
2448
|
-
"dist",
|
|
2449
|
-
"commands",
|
|
2450
|
-
"translate-sql",
|
|
2451
|
-
"index.js"
|
|
2452
|
-
]
|
|
2453
|
-
},
|
|
2454
2519
|
"test:compare": {
|
|
2455
2520
|
"aliases": [],
|
|
2456
2521
|
"args": {
|
|
@@ -2994,6 +3059,105 @@
|
|
|
2994
3059
|
"validate.js"
|
|
2995
3060
|
]
|
|
2996
3061
|
},
|
|
3062
|
+
"translate-sql": {
|
|
3063
|
+
"aliases": [],
|
|
3064
|
+
"args": {},
|
|
3065
|
+
"description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
|
|
3066
|
+
"examples": [
|
|
3067
|
+
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
|
|
3068
|
+
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
|
|
3069
|
+
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
|
|
3070
|
+
"<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
|
|
3071
|
+
],
|
|
3072
|
+
"flags": {
|
|
3073
|
+
"from": {
|
|
3074
|
+
"description": "Source SQL dialect",
|
|
3075
|
+
"name": "from",
|
|
3076
|
+
"required": true,
|
|
3077
|
+
"hasDynamicHelp": false,
|
|
3078
|
+
"multiple": false,
|
|
3079
|
+
"options": [
|
|
3080
|
+
"sqlserver",
|
|
3081
|
+
"postgresql"
|
|
3082
|
+
],
|
|
3083
|
+
"type": "option"
|
|
3084
|
+
},
|
|
3085
|
+
"to": {
|
|
3086
|
+
"description": "Target SQL dialect",
|
|
3087
|
+
"name": "to",
|
|
3088
|
+
"required": true,
|
|
3089
|
+
"hasDynamicHelp": false,
|
|
3090
|
+
"multiple": false,
|
|
3091
|
+
"options": [
|
|
3092
|
+
"sqlserver",
|
|
3093
|
+
"postgresql"
|
|
3094
|
+
],
|
|
3095
|
+
"type": "option"
|
|
3096
|
+
},
|
|
3097
|
+
"scope": {
|
|
3098
|
+
"description": "What to scan for translation",
|
|
3099
|
+
"name": "scope",
|
|
3100
|
+
"default": "all",
|
|
3101
|
+
"hasDynamicHelp": false,
|
|
3102
|
+
"multiple": false,
|
|
3103
|
+
"options": [
|
|
3104
|
+
"queries",
|
|
3105
|
+
"views",
|
|
3106
|
+
"filters",
|
|
3107
|
+
"all"
|
|
3108
|
+
],
|
|
3109
|
+
"type": "option"
|
|
3110
|
+
},
|
|
3111
|
+
"sql": {
|
|
3112
|
+
"description": "Translate a single SQL fragment (inline mode)",
|
|
3113
|
+
"name": "sql",
|
|
3114
|
+
"hasDynamicHelp": false,
|
|
3115
|
+
"multiple": false,
|
|
3116
|
+
"type": "option"
|
|
3117
|
+
},
|
|
3118
|
+
"dry-run": {
|
|
3119
|
+
"description": "Show what would be translated without making changes",
|
|
3120
|
+
"name": "dry-run",
|
|
3121
|
+
"allowNo": false,
|
|
3122
|
+
"type": "boolean"
|
|
3123
|
+
},
|
|
3124
|
+
"review": {
|
|
3125
|
+
"description": "Generate review report only (no writes to database)",
|
|
3126
|
+
"name": "review",
|
|
3127
|
+
"allowNo": false,
|
|
3128
|
+
"type": "boolean"
|
|
3129
|
+
},
|
|
3130
|
+
"output": {
|
|
3131
|
+
"char": "o",
|
|
3132
|
+
"description": "Output directory for the translation report",
|
|
3133
|
+
"name": "output",
|
|
3134
|
+
"hasDynamicHelp": false,
|
|
3135
|
+
"multiple": false,
|
|
3136
|
+
"type": "option"
|
|
3137
|
+
},
|
|
3138
|
+
"force": {
|
|
3139
|
+
"description": "Re-translate even if platform variants already exist",
|
|
3140
|
+
"name": "force",
|
|
3141
|
+
"allowNo": false,
|
|
3142
|
+
"type": "boolean"
|
|
3143
|
+
}
|
|
3144
|
+
},
|
|
3145
|
+
"hasDynamicHelp": false,
|
|
3146
|
+
"hiddenAliases": [],
|
|
3147
|
+
"id": "translate-sql",
|
|
3148
|
+
"pluginAlias": "@memberjunction/cli",
|
|
3149
|
+
"pluginName": "@memberjunction/cli",
|
|
3150
|
+
"pluginType": "core",
|
|
3151
|
+
"strict": true,
|
|
3152
|
+
"enableJsonFlag": false,
|
|
3153
|
+
"isESM": true,
|
|
3154
|
+
"relativePath": [
|
|
3155
|
+
"dist",
|
|
3156
|
+
"commands",
|
|
3157
|
+
"translate-sql",
|
|
3158
|
+
"index.js"
|
|
3159
|
+
]
|
|
3160
|
+
},
|
|
2997
3161
|
"ai:actions:list": {
|
|
2998
3162
|
"aliases": [],
|
|
2999
3163
|
"args": {},
|
|
@@ -3602,5 +3766,5 @@
|
|
|
3602
3766
|
]
|
|
3603
3767
|
}
|
|
3604
3768
|
},
|
|
3605
|
-
"version": "5.
|
|
3769
|
+
"version": "5.32.0"
|
|
3606
3770
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.32.0",
|
|
5
5
|
"description": "MemberJunction command line tools",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"oclif"
|
|
@@ -54,20 +54,22 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@inquirer/prompts": "^8.2.0",
|
|
57
|
-
"@memberjunction/ai-cli": "5.
|
|
58
|
-
"@memberjunction/codegen-lib": "5.
|
|
59
|
-
"@memberjunction/config": "5.
|
|
60
|
-
"@memberjunction/core": "5.
|
|
61
|
-
"@memberjunction/installer": "5.
|
|
62
|
-
"@memberjunction/db-auto-doc": "5.
|
|
63
|
-
"@memberjunction/metadata-sync": "5.
|
|
64
|
-
"@memberjunction/open-app-engine": "5.
|
|
65
|
-
"@memberjunction/query-gen": "5.
|
|
66
|
-
"@memberjunction/server-bootstrap-lite": "5.
|
|
67
|
-
"@memberjunction/skyway-core": "^0.
|
|
68
|
-
"@memberjunction/
|
|
69
|
-
"@memberjunction/sqlserver
|
|
70
|
-
"@memberjunction/
|
|
57
|
+
"@memberjunction/ai-cli": "5.32.0",
|
|
58
|
+
"@memberjunction/codegen-lib": "5.32.0",
|
|
59
|
+
"@memberjunction/config": "5.32.0",
|
|
60
|
+
"@memberjunction/core": "5.32.0",
|
|
61
|
+
"@memberjunction/installer": "5.32.0",
|
|
62
|
+
"@memberjunction/db-auto-doc": "5.32.0",
|
|
63
|
+
"@memberjunction/metadata-sync": "5.32.0",
|
|
64
|
+
"@memberjunction/open-app-engine": "5.32.0",
|
|
65
|
+
"@memberjunction/query-gen": "5.32.0",
|
|
66
|
+
"@memberjunction/server-bootstrap-lite": "5.32.0",
|
|
67
|
+
"@memberjunction/skyway-core": "^0.6.0",
|
|
68
|
+
"@memberjunction/skyway-postgres": "^0.6.0",
|
|
69
|
+
"@memberjunction/skyway-sqlserver": "^0.6.0",
|
|
70
|
+
"@memberjunction/sql-converter": "5.32.0",
|
|
71
|
+
"@memberjunction/sqlserver-dataprovider": "5.32.0",
|
|
72
|
+
"@memberjunction/testing-cli": "5.32.0",
|
|
71
73
|
"@oclif/core": "^3.27.0",
|
|
72
74
|
"@oclif/plugin-help": "^6.2.37",
|
|
73
75
|
"@oclif/plugin-version": "^2.2.36",
|