@zxsylph/dbml-formatter 1.0.1 → 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.
- package/package.json +7 -3
- package/.agent/workflows/publish_to_npm.md +0 -50
- package/sample.dbml +0 -21
- package/sample_messy.dbml +0 -3
- package/sample_messy2.dbml +0 -4
- package/sample_messy3.dbml +0 -5
- package/sample_messy4.dbml +0 -5
- package/sample_messy5.dbml +0 -6
- /package/bin/{dbml_formatter.js → dbml-formatter} +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zxsylph/dbml-formatter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
5
|
+
"files": [
|
|
6
|
+
"bin",
|
|
7
|
+
"src",
|
|
8
|
+
"tsconfig.json"
|
|
9
|
+
],
|
|
6
10
|
"scripts": {
|
|
7
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
12
|
},
|
|
@@ -10,7 +14,7 @@
|
|
|
10
14
|
"author": "",
|
|
11
15
|
"license": "ISC",
|
|
12
16
|
"bin": {
|
|
13
|
-
"
|
|
17
|
+
"dbml-formatter": "./bin/dbml-formatter"
|
|
14
18
|
},
|
|
15
19
|
"dependencies": {
|
|
16
20
|
"@dbml/core": "^5.4.1",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: How to publish the package to NPM
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Publishing to NPM
|
|
6
|
-
|
|
7
|
-
Follow these steps to publish your `dbml_formatter` tool to the NPM registry.
|
|
8
|
-
|
|
9
|
-
## 1. Prepare the Package
|
|
10
|
-
|
|
11
|
-
1. **Check Package Name**: The name `dbml-extension` might be taken. You should check [npmjs.com](https://www.npmjs.com/) or change `"name"` in `package.json` to something unique (e.g., `@your-username/dbml-formatter` or `dbml-fmt-cli`).
|
|
12
|
-
2. **Update Version**: Ensure `"version"` in `package.json` is correct (e.g., `1.0.0` for initial release).
|
|
13
|
-
3. **Clean Dependencies**: Since we are using `ts-node` at runtime, ensuring `typescript` and `ts-node` are in `"dependencies"` (which they are) is correct for this setup.
|
|
14
|
-
|
|
15
|
-
## 2. Authenticate
|
|
16
|
-
|
|
17
|
-
Run the following command to log in to your NPM account:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm login
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 3. Publish
|
|
24
|
-
|
|
25
|
-
Run the publish command:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm publish
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
If you are using a scoped name (like `@user/pkg`), use:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm publish --access public
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## 4. Usage After Publishing
|
|
38
|
-
|
|
39
|
-
Once published, anyone can run your tool using `npx`:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npx [your-package-name] <file.dbml>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
If you named it `dbml-extension`, they would run `npx dbml-extension <file>`.
|
|
46
|
-
If you want the command to be `npx dbml_formatter`, you should name the package `dbml_formatter` (if available), OR users can run:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npx -p [your-package-name] dbml_formatter <file>
|
|
50
|
-
```
|
package/sample.dbml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Table definition for users
|
|
2
|
-
Table users {
|
|
3
|
-
id integer [primary key, increment] // Auto-incrementing ID
|
|
4
|
-
username varchar
|
|
5
|
-
email varchar [unique]
|
|
6
|
-
created_at timestamp
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
Multi-line comment
|
|
11
|
-
about posts
|
|
12
|
-
*/
|
|
13
|
-
Table posts{
|
|
14
|
-
id integer [primary key]
|
|
15
|
-
user_id integer
|
|
16
|
-
title varchar
|
|
17
|
-
body text [note: 'Content of the post']
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Reference link
|
|
21
|
-
Ref: posts.user_id > users.id
|
package/sample_messy.dbml
DELETED
package/sample_messy2.dbml
DELETED
package/sample_messy3.dbml
DELETED
package/sample_messy4.dbml
DELETED
package/sample_messy5.dbml
DELETED
|
File without changes
|