@pasosdejesus/m 0.30.1 → 0.31.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 (82) hide show
  1. package/dist/CHANGELOG.md +36 -0
  2. package/dist/blockchain/deployments.d.ts +2 -1
  3. package/dist/blockchain/deployments.d.ts.map +1 -1
  4. package/dist/blockchain/deployments.js +4 -3
  5. package/dist/blockchain/deployments.js.map +1 -1
  6. package/dist/compose/data.d.ts +20 -1
  7. package/dist/compose/data.d.ts.map +1 -1
  8. package/dist/compose/data.js +50 -3
  9. package/dist/compose/data.js.map +1 -1
  10. package/dist/compose/index.d.ts +1 -1
  11. package/dist/compose/index.d.ts.map +1 -1
  12. package/dist/compose/index.js +1 -1
  13. package/dist/compose/index.js.map +1 -1
  14. package/dist/e2e/env.js +1 -1
  15. package/dist/e2e/env.js.map +1 -1
  16. package/dist/i18n/locales/cli.js +4 -4
  17. package/dist/i18n/locales/cli.js.map +1 -1
  18. package/dist/m.js +2 -1
  19. package/dist/m.js.map +1 -1
  20. package/dist/tasks/create.js +8 -8
  21. package/dist/tasks/create.js.map +1 -1
  22. package/dist/tasks/engine.d.ts.map +1 -1
  23. package/dist/tasks/engine.js +12 -4
  24. package/dist/tasks/engine.js.map +1 -1
  25. package/dist/tasks/update.d.ts.map +1 -1
  26. package/dist/tasks/update.js +4 -1
  27. package/dist/tasks/update.js.map +1 -1
  28. package/dist/templates/AGENTS.md.hbs +8 -8
  29. package/dist/templates/ARCHITECTURE.md.hbs +10 -10
  30. package/dist/templates/CONTRIBUTING.md.hbs +5 -5
  31. package/dist/templates/Makefile +21 -9
  32. package/dist/templates/README.md.hbs +18 -11
  33. package/dist/templates/apps/{hardhat → contracts}/Makefile +4 -4
  34. package/dist/templates/apps/{hardhat → contracts}/README.md +2 -2
  35. package/dist/templates/apps/{hardhat/package.json → contracts/package.json.hbs} +6 -7
  36. package/dist/templates/apps/{hardhat → contracts}/scripts/sync-usdt.mjs +2 -2
  37. package/dist/templates/apps/{hardhat → contracts}/sync-abis.mjs +4 -4
  38. package/dist/templates/apps/{nextjs → web}/Makefile +0 -4
  39. package/dist/templates/apps/{nextjs → web}/package.json.hbs +12 -14
  40. package/dist/templates/package.json.hbs +12 -0
  41. package/dist/templates/pnpm-workspace.yaml.hbs +42 -0
  42. package/dist/util/engines.d.ts +1 -1
  43. package/dist/util/engines.js +1 -1
  44. package/package.json +2 -2
  45. package/src/blockchain/README.md +1 -1
  46. package/src/shadcn_components/README.md +2 -2
  47. package/src/wallet/README.md +15 -0
  48. package/dist/templates/apps/nextjs/pnpm-workspace.yaml +0 -13
  49. /package/dist/templates/apps/{hardhat → contracts}/.prettierrc +0 -0
  50. /package/dist/templates/apps/{hardhat → contracts}/MOCK_USDT_README.md +0 -0
  51. /package/dist/templates/apps/{hardhat → contracts}/bin/MusdtVerification +0 -0
  52. /package/dist/templates/apps/{hardhat → contracts}/bin/approveDepositOwner +0 -0
  53. /package/dist/templates/apps/{hardhat → contracts}/bin/contractVerification +0 -0
  54. /package/dist/templates/apps/{hardhat → contracts}/bin/deployMockUSDT +0 -0
  55. /package/dist/templates/apps/{hardhat → contracts}/bin/prepadJ.sh +0 -0
  56. /package/dist/templates/apps/{hardhat → contracts}/bin/verifyMockUSDT +0 -0
  57. /package/dist/templates/apps/{hardhat → contracts}/hardhat.config.ts +0 -0
  58. /package/dist/templates/apps/{hardhat → contracts}/scripts/approveDepositOwner.ts +0 -0
  59. /package/dist/templates/apps/{hardhat → contracts}/scripts/deployMockUSDT.ts +0 -0
  60. /package/dist/templates/apps/{hardhat → contracts}/scripts/verifyDeployment.ts +0 -0
  61. /package/dist/templates/apps/{hardhat → contracts}/scripts/verifyMockUSDT.ts +0 -0
  62. /package/dist/templates/apps/{hardhat → contracts}/tsconfig.json +0 -0
  63. /package/dist/templates/apps/{nextjs → web}/.config/kysely.config.ts +0 -0
  64. /package/dist/templates/apps/{nextjs → web}/README.md.hbs +0 -0
  65. /package/dist/templates/apps/{nextjs → web}/abis/IERC20.json +0 -0
  66. /package/dist/templates/apps/{nextjs → web}/abis/MockUSDT.json +0 -0
  67. /package/dist/templates/apps/{nextjs → web}/abis/ReentrancyGuard.json +0 -0
  68. /package/dist/templates/apps/{nextjs → web}/app/globals.css +0 -0
  69. /package/dist/templates/apps/{nextjs → web}/app/layout.tsx.hbs +0 -0
  70. /package/dist/templates/apps/{nextjs → web}/app/page.tsx.hbs +0 -0
  71. /package/dist/templates/apps/{nextjs → web}/app/testui/page.tsx +0 -0
  72. /package/dist/templates/apps/{nextjs → web}/bin/m +0 -0
  73. /package/dist/templates/apps/{nextjs → web}/components.json +0 -0
  74. /package/dist/templates/apps/{nextjs → web}/next-env.d.ts +0 -0
  75. /package/dist/templates/apps/{nextjs → web}/next.config.ts +0 -0
  76. /package/dist/templates/apps/{nextjs → web}/postcss.config.mjs +0 -0
  77. /package/dist/templates/apps/{nextjs → web}/tailwind.config.js +0 -0
  78. /package/dist/templates/apps/{nextjs → web}/tests/global-setup.ts +0 -0
  79. /package/dist/templates/apps/{nextjs → web}/tests/helpers.ts +0 -0
  80. /package/dist/templates/apps/{nextjs → web}/tests/setup-env.ts.hbs +0 -0
  81. /package/dist/templates/apps/{nextjs → web}/tsconfig.json +0 -0
  82. /package/dist/templates/apps/{nextjs → web}/vitest.config.ts +0 -0
@@ -30,7 +30,7 @@ export declare function loadEnginePackages(pkgFile: string): Promise<void>;
30
30
  /**
31
31
  * Locate the `packages/` directory by searching upward from `startDir`.
32
32
  * Mirrors the CLI's hierarchical .env / package.json lookup
33
- * (apps/nextjs → apps → project root). Returns null if none found.
33
+ * (apps/web → apps → project root). Returns null if none found.
34
34
  */
35
35
  export declare function findPackagesDir(startDir: string): Promise<string | null>;
36
36
  /**
@@ -77,7 +77,7 @@ export async function loadEnginePackages(pkgFile) {
77
77
  /**
78
78
  * Locate the `packages/` directory by searching upward from `startDir`.
79
79
  * Mirrors the CLI's hierarchical .env / package.json lookup
80
- * (apps/nextjs → apps → project root). Returns null if none found.
80
+ * (apps/web → apps → project root). Returns null if none found.
81
81
  */
82
82
  export async function findPackagesDir(startDir) {
83
83
  let current = startDir;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pasosdejesus/m",
3
- "version": "0.30.1",
3
+ "version": "0.31.0",
4
4
  "description": "Motor para crear y gestionar proyectos al estilo Pasos de Jesus.",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -141,7 +141,7 @@
141
141
  "picocolors": "^1.1.1"
142
142
  },
143
143
  "optionalDependencies": {
144
- "@pasosdejesus/contract-test": "0.1.4",
144
+ "@pasosdejesus/contract-test": "0.1.5",
145
145
  "@pasosdejesus/edr": "0.1.2"
146
146
  },
147
147
  "devDependencies": {
@@ -49,7 +49,7 @@ const usdt = getContractAddress('celo', 'NEXT_PUBLIC_USDT_ADDRESS', deploymentsD
49
49
  ┌──────────────────────────────────────────────────────┐
50
50
  │ Project (sivel.xyz / learn.tg) │
51
51
  │ │
52
- │ apps/hardhat/deployments/ │
52
+ │ apps/contracts/deployments/ │
53
53
  │ └── *.json (deployment addresses) │
54
54
  │ │
55
55
  │ lib/deployments.ts │
@@ -117,9 +117,9 @@ Components use Tailwind classes. Your project needs Tailwind configured with the
117
117
 
118
118
  ## Tests
119
119
 
120
- Tests for these components are in `tests/test-project/apps/nextjs/tests/shadcn-components/` of the `@pasosdejesus/m` repository. Run with:
120
+ Tests for these components are in `tests/test-project/apps/web/tests/shadcn-components/` of the `@pasosdejesus/m` repository. Run with:
121
121
 
122
122
  ```bash
123
- cd tests/test-project/apps/nextjs
123
+ cd tests/test-project/apps/web
124
124
  make test
125
125
  ```
@@ -91,6 +91,21 @@ configureInAppWallet({
91
91
  `react` es un *optional peer*: el subpath está fuera del barrel, así que importar
92
92
  `@pasosdejesus/m/wallet` no arrastra React.
93
93
 
94
+ ## Integración con el host (CSP)
95
+
96
+ La llave privada vive en la página: desbloquear, firmar y mover fondos son JavaScript en el
97
+ origen del host, así que el host **debe** servir una CSP estricta (referencia de implementación:
98
+ `learn.tg/doc/csp.md`). Contrato mínimo que el paquete espera del host:
99
+
100
+ - `script-src` con **nonce por request** (Next inyecta scripts de hidratación) y **sin**
101
+ `'unsafe-eval'` ni `'unsafe-inline'` para scripts.
102
+ - **Sin `worker-src`**: el núcleo **no** crea Web Workers (tampoco usa `eval`/`new Function`).
103
+ - `connect-src`: incluir el RPC que se pase a `getInAppWalletProvider({ rpcUrl })`.
104
+ - `img-src`: incluir los hosts de imágenes que use tu UI (p. ej. NFT/IPFS); `data:` sólo si
105
+ renderizas QR como data-URL.
106
+ - `default-src 'self'` y `frame-ancestors 'none'`.
107
+ - **Origen seguro** (`https:` o `localhost`): lo exigen `crypto.subtle` (WebCrypto) y WebAuthn.
108
+
94
109
  ## Pruebas
95
110
 
96
111
  Mocks en `@pasosdejesus/m/test-utils` (`installLocalStorage`, `installIndexedDB`,
@@ -1,13 +0,0 @@
1
- allowBuilds:
2
- '@pasosdejesus/m': true
3
- bufferutil: true
4
- esbuild: true
5
- keccak: true
6
- sharp: true
7
- utf-8-validate: true
8
-
9
- overrides:
10
- '@parcel/watcher': npm:@parcel/watcher-wasm
11
- rollup: npm:@rollup/wasm-node
12
- lightningcss: npm:lightningcss-wasm
13
- '@tailwindcss/oxide': npm:@tailwindcss/oxide-wasm32-wasi
File without changes