@apso/cli 0.56.0 → 0.57.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.
Files changed (34) hide show
  1. package/dist/commands/import/data.d.ts +1 -0
  2. package/dist/commands/import/data.js +8 -3
  3. package/dist/commands/import/{supabase.d.ts → index.d.ts} +4 -1
  4. package/dist/commands/import/{supabase.js → index.js} +19 -10
  5. package/dist/commands/schema/validate.js +5 -0
  6. package/dist/lib/access/cases.js +1 -2
  7. package/dist/lib/access/rules.json +1 -1
  8. package/dist/lib/api/services.js +15 -1
  9. package/dist/lib/base-command.d.ts +6 -0
  10. package/dist/lib/base-command.js +14 -0
  11. package/dist/lib/generators/go.d.ts +18 -0
  12. package/dist/lib/generators/go.js +40 -18
  13. package/dist/lib/generators/python.js +6 -7
  14. package/dist/lib/generators/typescript.js +48 -9
  15. package/dist/lib/guards.d.ts +43 -5
  16. package/dist/lib/guards.js +148 -18
  17. package/dist/lib/import/copy-data.d.ts +23 -5
  18. package/dist/lib/import/copy-data.js +45 -7
  19. package/dist/lib/import/index.d.ts +1 -1
  20. package/dist/lib/import/index.js +2 -1
  21. package/dist/lib/import/pg-data.d.ts +1 -1
  22. package/dist/lib/import/pg-data.js +10 -5
  23. package/dist/lib/templates/go/middleware/auth.eta +136 -7
  24. package/dist/lib/templates/go/services/service.eta +29 -1
  25. package/dist/lib/templates/guards/permission.guard.eta +15 -0
  26. package/dist/lib/templates/guards/scope.guard.eta +9 -5
  27. package/dist/lib/templates/python/auth.eta +100 -2
  28. package/dist/lib/templates/python/services/service.eta +19 -0
  29. package/dist/lib/templates/rest/controller-rest.eta +17 -2
  30. package/dist/lib/templates/rest/dto-rest.eta +20 -8
  31. package/dist/lib/templates/rest/index-module-rest.eta +5 -1
  32. package/npm-shrinkwrap.json +2 -2
  33. package/oclif.manifest.json +23 -14
  34. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.56.0",
2
+ "version": "0.57.1",
3
3
  "commands": {
4
4
  "config": {
5
5
  "id": "config",
@@ -843,7 +843,7 @@
843
843
  },
844
844
  "import:data": {
845
845
  "id": "import:data",
846
- "description": "Copy table data from a source Supabase (Postgres) database into the target database rebuilt from the imported schema. Reads the source read-only; inserts into empty target tables.",
846
+ "description": "Copy table data from a source Postgres database (Supabase, Neon, RDS, or any other) into the target database rebuilt from the imported schema. Reads the source read-only; inserts into empty target tables.",
847
847
  "strict": true,
848
848
  "pluginName": "@apso/cli",
849
849
  "pluginAlias": "@apso/cli",
@@ -906,54 +906,63 @@
906
906
  },
907
907
  "args": {}
908
908
  },
909
- "import:supabase": {
910
- "id": "import:supabase",
911
- "description": "Introspect an existing Supabase (Postgres) database and generate a local .apsorc schema. Read-only: it never writes to the source database.",
909
+ "import": {
910
+ "id": "import",
911
+ "description": "Introspect an existing Postgres database (Supabase, Neon, RDS, or any Postgres you can reach with a connection string) and generate a local .apsorc schema. Runs on your machine and is read-only: it never writes to the source database.",
912
912
  "strict": true,
913
913
  "pluginName": "@apso/cli",
914
914
  "pluginAlias": "@apso/cli",
915
915
  "pluginType": "core",
916
- "aliases": [],
916
+ "aliases": [
917
+ "import:supabase"
918
+ ],
917
919
  "hiddenAliases": [],
918
920
  "examples": [
919
- "$ apso import supabase",
920
- "$ apso import supabase -c \"postgresql://postgres:[pw]@db.[ref].supabase.co:5432/postgres\"",
921
- "$ SUPABASE_DB_URL=\"postgresql://...\" apso import supabase --dry-run"
921
+ "$ apso import",
922
+ "$ apso import -c \"postgresql://user:[pw]@host:5432/dbname\"",
923
+ "$ apso import -c \"postgresql://postgres:[pw]@db.[ref].supabase.co:5432/postgres\"",
924
+ "$ DATABASE_URL=\"postgresql://...\" apso import --dry-run"
922
925
  ],
926
+ "deprecateAliases": true,
923
927
  "flags": {
924
928
  "connection-string": {
925
929
  "name": "connection-string",
926
930
  "type": "option",
927
931
  "char": "c",
928
932
  "description": "Postgres connection string. Falls back to SUPABASE_DB_URL or DATABASE_URL, then prompts.",
929
- "multiple": false
933
+ "multiple": false,
934
+ "deprecateAliases": true
930
935
  },
931
936
  "schema": {
932
937
  "name": "schema",
933
938
  "type": "option",
934
939
  "description": "Database schema to import",
935
940
  "multiple": false,
936
- "default": "public"
941
+ "default": "public",
942
+ "deprecateAliases": true
937
943
  },
938
944
  "out": {
939
945
  "name": "out",
940
946
  "type": "option",
941
947
  "char": "o",
942
948
  "description": "Path to write the .apsorc (default: existing .apsorc or ./.apsorc)",
943
- "multiple": false
949
+ "multiple": false,
950
+ "deprecateAliases": true
944
951
  },
945
952
  "dry-run": {
946
953
  "name": "dry-run",
947
954
  "type": "boolean",
948
955
  "description": "Introspect and print a summary without writing any file",
949
- "allowNo": false
956
+ "allowNo": false,
957
+ "deprecateAliases": true
950
958
  },
951
959
  "yes": {
952
960
  "name": "yes",
953
961
  "type": "boolean",
954
962
  "char": "y",
955
963
  "description": "Skip the overwrite confirmation prompt",
956
- "allowNo": false
964
+ "allowNo": false,
965
+ "deprecateAliases": true
957
966
  }
958
967
  },
959
968
  "args": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apso/cli",
3
- "version": "0.56.0",
3
+ "version": "0.57.1",
4
4
  "mcpName": "io.github.apsoai/apso",
5
5
  "description": "Apso CLI",
6
6
  "author": "Apso by Mavric - @mavric",