@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.
- package/dist/CHANGELOG.md +36 -0
- package/dist/blockchain/deployments.d.ts +2 -1
- package/dist/blockchain/deployments.d.ts.map +1 -1
- package/dist/blockchain/deployments.js +4 -3
- package/dist/blockchain/deployments.js.map +1 -1
- package/dist/compose/data.d.ts +20 -1
- package/dist/compose/data.d.ts.map +1 -1
- package/dist/compose/data.js +50 -3
- package/dist/compose/data.js.map +1 -1
- package/dist/compose/index.d.ts +1 -1
- package/dist/compose/index.d.ts.map +1 -1
- package/dist/compose/index.js +1 -1
- package/dist/compose/index.js.map +1 -1
- package/dist/e2e/env.js +1 -1
- package/dist/e2e/env.js.map +1 -1
- package/dist/i18n/locales/cli.js +4 -4
- package/dist/i18n/locales/cli.js.map +1 -1
- package/dist/m.js +2 -1
- package/dist/m.js.map +1 -1
- package/dist/tasks/create.js +8 -8
- package/dist/tasks/create.js.map +1 -1
- package/dist/tasks/engine.d.ts.map +1 -1
- package/dist/tasks/engine.js +12 -4
- package/dist/tasks/engine.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +4 -1
- package/dist/tasks/update.js.map +1 -1
- package/dist/templates/AGENTS.md.hbs +8 -8
- package/dist/templates/ARCHITECTURE.md.hbs +10 -10
- package/dist/templates/CONTRIBUTING.md.hbs +5 -5
- package/dist/templates/Makefile +21 -9
- package/dist/templates/README.md.hbs +18 -11
- package/dist/templates/apps/{hardhat → contracts}/Makefile +4 -4
- package/dist/templates/apps/{hardhat → contracts}/README.md +2 -2
- package/dist/templates/apps/{hardhat/package.json → contracts/package.json.hbs} +6 -7
- package/dist/templates/apps/{hardhat → contracts}/scripts/sync-usdt.mjs +2 -2
- package/dist/templates/apps/{hardhat → contracts}/sync-abis.mjs +4 -4
- package/dist/templates/apps/{nextjs → web}/Makefile +0 -4
- package/dist/templates/apps/{nextjs → web}/package.json.hbs +12 -14
- package/dist/templates/package.json.hbs +12 -0
- package/dist/templates/pnpm-workspace.yaml.hbs +42 -0
- package/dist/util/engines.d.ts +1 -1
- package/dist/util/engines.js +1 -1
- package/package.json +2 -2
- package/src/blockchain/README.md +1 -1
- package/src/shadcn_components/README.md +2 -2
- package/src/wallet/README.md +15 -0
- package/dist/templates/apps/nextjs/pnpm-workspace.yaml +0 -13
- /package/dist/templates/apps/{hardhat → contracts}/.prettierrc +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/MOCK_USDT_README.md +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/bin/MusdtVerification +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/bin/approveDepositOwner +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/bin/contractVerification +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/bin/deployMockUSDT +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/bin/prepadJ.sh +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/bin/verifyMockUSDT +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/hardhat.config.ts +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/scripts/approveDepositOwner.ts +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/scripts/deployMockUSDT.ts +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/scripts/verifyDeployment.ts +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/scripts/verifyMockUSDT.ts +0 -0
- /package/dist/templates/apps/{hardhat → contracts}/tsconfig.json +0 -0
- /package/dist/templates/apps/{nextjs → web}/.config/kysely.config.ts +0 -0
- /package/dist/templates/apps/{nextjs → web}/README.md.hbs +0 -0
- /package/dist/templates/apps/{nextjs → web}/abis/IERC20.json +0 -0
- /package/dist/templates/apps/{nextjs → web}/abis/MockUSDT.json +0 -0
- /package/dist/templates/apps/{nextjs → web}/abis/ReentrancyGuard.json +0 -0
- /package/dist/templates/apps/{nextjs → web}/app/globals.css +0 -0
- /package/dist/templates/apps/{nextjs → web}/app/layout.tsx.hbs +0 -0
- /package/dist/templates/apps/{nextjs → web}/app/page.tsx.hbs +0 -0
- /package/dist/templates/apps/{nextjs → web}/app/testui/page.tsx +0 -0
- /package/dist/templates/apps/{nextjs → web}/bin/m +0 -0
- /package/dist/templates/apps/{nextjs → web}/components.json +0 -0
- /package/dist/templates/apps/{nextjs → web}/next-env.d.ts +0 -0
- /package/dist/templates/apps/{nextjs → web}/next.config.ts +0 -0
- /package/dist/templates/apps/{nextjs → web}/postcss.config.mjs +0 -0
- /package/dist/templates/apps/{nextjs → web}/tailwind.config.js +0 -0
- /package/dist/templates/apps/{nextjs → web}/tests/global-setup.ts +0 -0
- /package/dist/templates/apps/{nextjs → web}/tests/helpers.ts +0 -0
- /package/dist/templates/apps/{nextjs → web}/tests/setup-env.ts.hbs +0 -0
- /package/dist/templates/apps/{nextjs → web}/tsconfig.json +0 -0
- /package/dist/templates/apps/{nextjs → web}/vitest.config.ts +0 -0
package/dist/util/engines.d.ts
CHANGED
|
@@ -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/
|
|
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
|
/**
|
package/dist/util/engines.js
CHANGED
|
@@ -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/
|
|
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.
|
|
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.
|
|
144
|
+
"@pasosdejesus/contract-test": "0.1.5",
|
|
145
145
|
"@pasosdejesus/edr": "0.1.2"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
package/src/blockchain/README.md
CHANGED
|
@@ -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/
|
|
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/
|
|
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/
|
|
123
|
+
cd tests/test-project/apps/web
|
|
124
124
|
make test
|
|
125
125
|
```
|
package/src/wallet/README.md
CHANGED
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|