targwire 1.0.0 → 1.0.3

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 (2) hide show
  1. package/README.md +7 -7
  2. package/package.json +11 -10
package/README.md CHANGED
@@ -12,11 +12,11 @@ Mini **IoC container** tipado para TypeScript com **Singleton**, **Transient (Fa
12
12
  ## Instalação
13
13
 
14
14
  ```bash
15
- npm i @seu-escopo/ioc
15
+ npm i targwire
16
16
  # ou
17
- yarn add @seu-escopo/ioc
17
+ yarn add targwire
18
18
  # ou
19
- pnpm add @seu-escopo/ioc
19
+ pnpm add targwire
20
20
  ```
21
21
 
22
22
  > O pacote já é publicado transpilado (ESM + CJS) com typings. Não precisa configurar Metro/Babel pra transpilar TS em `node_modules`.
@@ -68,7 +68,7 @@ registerIOCPlugin((c) => {
68
68
  // App.tsx
69
69
  import React from 'react';
70
70
  import '@/ioc/plugins'; // importa teus módulos (efeito colateral)
71
- import { bootstrapIOC } from '@seu-escopo/ioc';
71
+ import { bootstrapIOC } from 'targwire';
72
72
 
73
73
  bootstrapIOC();
74
74
 
@@ -108,7 +108,7 @@ import {
108
108
  // Plugins/Bootstrap
109
109
  registerIOCPlugin, // (registrar: (c: Container) => void)
110
110
  bootstrapIOC, // executa todos os registrars uma vez
111
- } from '@seu-escopo/ioc';
111
+ } from 'targwire';
112
112
  ```
113
113
 
114
114
  ### Ciclos de vida
@@ -239,7 +239,7 @@ test('override de use case', async () => {
239
239
  - Importar `@/ioc/plugins` **antes** de `bootstrapIOC()`.
240
240
  - Use um só estilo:
241
241
  ```ts
242
- import { bootstrapIOC } from '@seu-escopo/ioc'; // export nomeado
242
+ import { bootstrapIOC } from 'targwire'; // export nomeado
243
243
  ```
244
244
  - **Tokens repetidos em HMR/Metro**
245
245
  Use `Symbol.for('ioc:...')` (já fazemos) e, se necessário, `reset()` durante dev.
@@ -258,4 +258,4 @@ test('override de use case', async () => {
258
258
 
259
259
  ## Licença
260
260
 
261
- MIT © Você
261
+ MIT © Rafael Targino
package/package.json CHANGED
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "name": "targwire",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "TargWire – mini IoC para TS/JS com Singleton, Transient e Scoped (ideal para Expo/React Native).",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs",
8
- "module": "dist/index.mjs",
8
+ "module": "dist/index.js",
9
+ "react-native": "dist/index.js",
9
10
  "types": "dist/index.d.ts",
10
- "react-native": "dist/index.mjs",
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./dist/index.d.ts",
14
- "import": "./dist/index.mjs",
14
+ "import": "./dist/index.js",
15
15
  "require": "./dist/index.cjs"
16
- },
17
- "./package.json": "./package.json"
16
+ }
18
17
  },
19
18
  "sideEffects": false,
20
19
  "files": [
21
- "dist"
20
+ "dist",
21
+ "README.md",
22
+ "LICENSE"
22
23
  ],
23
24
  "scripts": {
24
25
  "build": "tsup",
@@ -26,8 +27,8 @@
26
27
  "prepublishOnly": "npm run clean && npm run build"
27
28
  },
28
29
  "devDependencies": {
29
- "rimraf": "^6.0.0",
30
- "tsup": "^8.5.0",
31
- "typescript": "^5.5.0"
30
+ "tsup": "^8.0.0",
31
+ "typescript": "^5.5.0",
32
+ "rimraf": "^6.0.0"
32
33
  }
33
34
  }