@ibgib/ts-gib 0.4.9
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/.vscode/launch.json +24 -0
- package/.vscode/settings.json +34 -0
- package/.vscode/tasks.json +37 -0
- package/CHANGELOG.md +159 -0
- package/README.md +502 -0
- package/dist/V1/constants.d.mts +22 -0
- package/dist/V1/constants.d.mts.map +1 -0
- package/dist/V1/constants.mjs +21 -0
- package/dist/V1/constants.mjs.map +1 -0
- package/dist/V1/factory.d.mts +23 -0
- package/dist/V1/factory.d.mts.map +1 -0
- package/dist/V1/factory.mjs +78 -0
- package/dist/V1/factory.mjs.map +1 -0
- package/dist/V1/index.d.mts +6 -0
- package/dist/V1/index.d.mts.map +1 -0
- package/dist/V1/index.mjs +6 -0
- package/dist/V1/index.mjs.map +1 -0
- package/dist/V1/sha256v1.d.mts +19 -0
- package/dist/V1/sha256v1.d.mts.map +1 -0
- package/dist/V1/sha256v1.mjs +86 -0
- package/dist/V1/sha256v1.mjs.map +1 -0
- package/dist/V1/transforms/fork.d.mts +16 -0
- package/dist/V1/transforms/fork.d.mts.map +1 -0
- package/dist/V1/transforms/fork.mjs +111 -0
- package/dist/V1/transforms/fork.mjs.map +1 -0
- package/dist/V1/transforms/index.d.mts +5 -0
- package/dist/V1/transforms/index.d.mts.map +1 -0
- package/dist/V1/transforms/index.mjs +5 -0
- package/dist/V1/transforms/index.mjs.map +1 -0
- package/dist/V1/transforms/mut8.d.mts +50 -0
- package/dist/V1/transforms/mut8.d.mts.map +1 -0
- package/dist/V1/transforms/mut8.mjs +246 -0
- package/dist/V1/transforms/mut8.mjs.map +1 -0
- package/dist/V1/transforms/rel8.d.mts +14 -0
- package/dist/V1/transforms/rel8.d.mts.map +1 -0
- package/dist/V1/transforms/rel8.mjs +176 -0
- package/dist/V1/transforms/rel8.mjs.map +1 -0
- package/dist/V1/transforms/transform-helper.d.mts +92 -0
- package/dist/V1/transforms/transform-helper.d.mts.map +1 -0
- package/dist/V1/transforms/transform-helper.mjs +189 -0
- package/dist/V1/transforms/transform-helper.mjs.map +1 -0
- package/dist/V1/types.d.mts +79 -0
- package/dist/V1/types.d.mts.map +1 -0
- package/dist/V1/types.mjs +12 -0
- package/dist/V1/types.mjs.map +1 -0
- package/dist/helper.d.mts +77 -0
- package/dist/helper.d.mts.map +1 -0
- package/dist/helper.mjs +179 -0
- package/dist/helper.mjs.map +1 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types.d.mts +242 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +2 -0
- package/dist/types.mjs.map +1 -0
- package/jasmine-browser.json +18 -0
- package/jasmine.json +6 -0
- package/package.json +61 -0
- package/src/V1/constants.mts +23 -0
- package/src/V1/factory.mts +110 -0
- package/src/V1/factory.spec.mts +162 -0
- package/src/V1/index.mts +5 -0
- package/src/V1/sha256v1.mts +85 -0
- package/src/V1/sha256v1.spec.mts +221 -0
- package/src/V1/transforms/fork.mts +100 -0
- package/src/V1/transforms/fork.spec.mts +410 -0
- package/src/V1/transforms/index.mts +4 -0
- package/src/V1/transforms/mut8.mts +239 -0
- package/src/V1/transforms/mut8.spec.mts +656 -0
- package/src/V1/transforms/rel8.mts +173 -0
- package/src/V1/transforms/rel8.spec.mts +556 -0
- package/src/V1/transforms/transform-helper.mts +263 -0
- package/src/V1/transforms/transform-helper.spec.mts +45 -0
- package/src/V1/types.mts +84 -0
- package/src/helper.mts +192 -0
- package/src/helper.spec.mts +127 -0
- package/src/index.cts +3 -0
- package/src/index.mts +3 -0
- package/src/types.mts +242 -0
- package/tsconfig.json +15 -0
- package/tsconfig.test.json +10 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"type": "node",
|
|
9
|
+
"request": "launch",
|
|
10
|
+
"name": "npm debug",
|
|
11
|
+
"runtimeExecutable": "npm",
|
|
12
|
+
"runtimeArgs": [
|
|
13
|
+
"run",
|
|
14
|
+
"debug",
|
|
15
|
+
],
|
|
16
|
+
"port": 9229,
|
|
17
|
+
"sourceMaps": true,
|
|
18
|
+
"skipFiles": [
|
|
19
|
+
"<node_internals>/**"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
+
"search.exclude": {
|
|
4
|
+
"**/*.BAK": true,
|
|
5
|
+
"**/dist": true
|
|
6
|
+
},
|
|
7
|
+
"files.watcherExclude": {
|
|
8
|
+
"**/*.BAK": true
|
|
9
|
+
},
|
|
10
|
+
"editor.formatOnSave": true,
|
|
11
|
+
"debug.node.autoAttach": "on",
|
|
12
|
+
"files.trimTrailingWhitespace": true,
|
|
13
|
+
"workbench.colorTheme": "Kimbie Dark",
|
|
14
|
+
"workbench.colorCustomizations": {
|
|
15
|
+
"editor.background": "#0E3003",
|
|
16
|
+
"sideBar.background": "#0E3003",
|
|
17
|
+
"editor.lineHighlightBackground": "#00ff2f18"
|
|
18
|
+
},
|
|
19
|
+
"editor.tokenColorCustomizations": {
|
|
20
|
+
"[Kimbie Dark]": {
|
|
21
|
+
"variables": "#c77a22",
|
|
22
|
+
"comments": "#fffb128c",
|
|
23
|
+
"textMateRules": [
|
|
24
|
+
{
|
|
25
|
+
"name": "Lists",
|
|
26
|
+
"scope": "markup.list",
|
|
27
|
+
"settings": {
|
|
28
|
+
"foreground": "#cb76d6"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
// for the documentation about the tasks.json format
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"tasks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "npm",
|
|
8
|
+
"script": "build",
|
|
9
|
+
"group": "build",
|
|
10
|
+
"problemMatcher": []
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "npm",
|
|
14
|
+
"script": "test",
|
|
15
|
+
"group": "build",
|
|
16
|
+
"problemMatcher": []
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "npm",
|
|
20
|
+
"script": "clean",
|
|
21
|
+
"group": "build",
|
|
22
|
+
"problemMatcher": []
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "npm",
|
|
26
|
+
"script": "build:test",
|
|
27
|
+
"group": "build",
|
|
28
|
+
"problemMatcher": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "npm",
|
|
32
|
+
"script": "prepare:publish",
|
|
33
|
+
"group": "build",
|
|
34
|
+
"problemMatcher": []
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
## 0.4.8
|
|
2
|
+
* migrating to scoped npm package @ibgib/ts-gib
|
|
3
|
+
* continued refinement of meta files eg .npmignore, .gitignore, tsconfig, etc.
|
|
4
|
+
* aligned with other projects to put packed files in ./published
|
|
5
|
+
* manual backups of these...should I have these in version control?
|
|
6
|
+
|
|
7
|
+
## 0.4.2
|
|
8
|
+
* enabled test framework to execute in both node and browser contexts.
|
|
9
|
+
* changed test framework to jasmine
|
|
10
|
+
* https://jasmine.github.io/pages/getting_started.html
|
|
11
|
+
* esm changes
|
|
12
|
+
* now ts uses *.mts file extensions to ultimately produce *.mjs files that
|
|
13
|
+
indicate esm modules.
|
|
14
|
+
* package.json `"type": "module"` added.
|
|
15
|
+
* migrated mocha/chai tests to jasmine syntax.
|
|
16
|
+
* had to change nested async describe blocks to single-level describes.
|
|
17
|
+
* mimicked nested `describe` blocks using `withContext`.
|
|
18
|
+
* recommended to jasmine to reexaminehttps://github.com/jasmine/jasmine/issues/1487
|
|
19
|
+
* synced .vscode/tasks.json
|
|
20
|
+
* IN PROGRESS: still working on ensuring library can be consumed in both other node packages.
|
|
21
|
+
* i need to consume this in my upcoming `space-gib` package.
|
|
22
|
+
* ultimately i will need to consume this in front end apps and cli apps.
|
|
23
|
+
* https://nodejs.org/api/esm.html
|
|
24
|
+
* need to look at package.json exports section
|
|
25
|
+
* currently have a "main" key that points to "dist/index.js"
|
|
26
|
+
* this may need to be broken out into "import" and "require" sub paths.
|
|
27
|
+
* need to do more testing obviously.
|
|
28
|
+
* https://www.typescriptlang.org/docs/handbook/esm-node.html
|
|
29
|
+
* https://levelup.gitconnected.com/transpiling-typescript-into-double-packages-commonjs-esm-d6b62cfc851c
|
|
30
|
+
* found various blogs online, but this one seems to be the best.
|
|
31
|
+
* if i use the strategy where you create a commonjs only with esm wrapper,
|
|
32
|
+
then you don't get tree-shaking.
|
|
33
|
+
* the tree-shaking aspect reminds me that ultimately i'm looking to utilize
|
|
34
|
+
ibgib + src granularity in a completely new way.
|
|
35
|
+
* added helper function `extractErrorMsg`
|
|
36
|
+
* added tests.
|
|
37
|
+
* maybe unnecessary, but i came across a bug in ionic-gib where trying to
|
|
38
|
+
hash/getGib for large file (400MB) was throwing an error in FF that was a
|
|
39
|
+
string and not an error proper.
|
|
40
|
+
* cleaned up some cruft
|
|
41
|
+
|
|
42
|
+
## 0.4.0/1
|
|
43
|
+
* isomorphic crypto changes
|
|
44
|
+
* simplify hashing to use node v19+ `globalThis.crypto`
|
|
45
|
+
* quick check with FF and Chrome on my mac shows they use this.
|
|
46
|
+
* node.js does NOT have `globalThis.crypto`
|
|
47
|
+
* got rid of node/browser set_target build file kluge
|
|
48
|
+
* ~todo: continue deleting cruft, but I'm checking in to bump version for testing pack.~
|
|
49
|
+
* done
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## 0.3.14/15
|
|
53
|
+
* major bug fix, but I'm leaving the minor version number the same. It's not
|
|
54
|
+
really a breaking change, as opposed to an important fix.
|
|
55
|
+
* the `fork` and `rel8` transforms were calculating the gibs **before**
|
|
56
|
+
adding the dna to the rel8ns when the `dna` param was true.
|
|
57
|
+
* definitely still alpha but good god, how did I miss this?
|
|
58
|
+
* changing `getGib` function in `transform-helper.ts`.
|
|
59
|
+
* changed `hasTjp` param to optional.
|
|
60
|
+
* now it always looks internally if falsy.
|
|
61
|
+
* now ignoring incoming `tjpAddr`.
|
|
62
|
+
* always checks internally for this.
|
|
63
|
+
|
|
64
|
+
## 0.3.12/13
|
|
65
|
+
* still "fixing" bug in transform-helper.ts `getGib` function.
|
|
66
|
+
* Apparently I was returning the wrong gib for tjp ibgibs with data.isTjp ===
|
|
67
|
+
true.
|
|
68
|
+
* Idk how tf this was going before...sigh. (I wasn't validating as much as I
|
|
69
|
+
am now.)
|
|
70
|
+
* That's (pre)alpha for you.
|
|
71
|
+
|
|
72
|
+
## 0.3.10/11
|
|
73
|
+
* fixed bug in transform-helper.ts `getGib` function.
|
|
74
|
+
* incorrectly threw error when didn't find tjp addr in rel8ns but ibgib itself
|
|
75
|
+
was tjp (data.isTjp was true).
|
|
76
|
+
* Minor error formatting changes.
|
|
77
|
+
* shortened (ERROR: ...) to (E: ...) and (WARNING: ...) to (W: ...)
|
|
78
|
+
|
|
79
|
+
## 0.3.8/9
|
|
80
|
+
* Tweak to transforms `nCounter`/`data.n` functionality.
|
|
81
|
+
* Before, you had to explicitly set `nCounter` in transform options every time.
|
|
82
|
+
But really, once there is a tjp (and consequently `data.n`), it should always be incrementing
|
|
83
|
+
with every transform automatically.
|
|
84
|
+
* In the future there may be a domain use for `data.n`, but we will
|
|
85
|
+
reexamine this when it becomes a priority.
|
|
86
|
+
|
|
87
|
+
## 0.3.6/7
|
|
88
|
+
* Tweak to transforms to create a projection of src with only
|
|
89
|
+
`ib`,`gib`,`data`,`rel8ns` properties.
|
|
90
|
+
* I'm getting a cyclic error because I'm mutating an ibGib src object that has additional properties.
|
|
91
|
+
The tweak just creates an intermediate dto before cloning the src, which should obviate the
|
|
92
|
+
possibility of a cyclic error if `data` is well-behaved (a map of only primitives).
|
|
93
|
+
|
|
94
|
+
## 0.3.0/1/2/3/4/5
|
|
95
|
+
* BREAKING
|
|
96
|
+
* I am putting the tjp in the gib of those ibgibs with tjps (temporal junction points).
|
|
97
|
+
* `${ib}^${hash}${GIB_DELIMITER}${tjpgib}` for those with tjps.
|
|
98
|
+
* `GIB_DELIMITER` defaulting to '.'
|
|
99
|
+
* e.g. "abc^gib456" will be "abc^gib456.tjp123"
|
|
100
|
+
* e.g. "comment hello^5d43dd4100324c4e93c9ee678c4141b4" to "comment hello^5d43dd4100324c4e93c9ee678c4141b4.690e715e0975403a9247e5b94a3209f0" with 690e715e0975403a9247e5b94a3209f0 being the comment ibgib's tjp.gib.
|
|
101
|
+
* So many patch versions because of bad packing/versioning on my part. Eek.
|
|
102
|
+
|
|
103
|
+
## 0.2.0/1
|
|
104
|
+
* BREAKING
|
|
105
|
+
* removing `src` from transform data.
|
|
106
|
+
* doing this because...
|
|
107
|
+
* we can apply dna to any src without having to delete this addr.
|
|
108
|
+
* makes dna less unique/more reusable
|
|
109
|
+
* this information is already captured in the created ibGib's 'dna' rel8n.
|
|
110
|
+
* tweaking workspace colors.
|
|
111
|
+
* removed some commented cruft
|
|
112
|
+
|
|
113
|
+
## 0.1.55/56
|
|
114
|
+
* Slight readme changes.
|
|
115
|
+
|
|
116
|
+
## 0.1.53/54
|
|
117
|
+
* package.json scripts for npm publishing convenience.
|
|
118
|
+
|
|
119
|
+
## 0.1.51/52
|
|
120
|
+
* added TRel8ns generic to `IbGib_V1` interface to enable customization of rel8ns.
|
|
121
|
+
* this is in addition to existing TData enabling data customization.
|
|
122
|
+
* had some difficulties with versions...eesh.
|
|
123
|
+
|
|
124
|
+
## 0.1.43/44
|
|
125
|
+
* added sha-512 to helper
|
|
126
|
+
* NOT IN ANY IBGIB_V1 CONTENT ADDRESSING. This is strictly for the base helper function.
|
|
127
|
+
|
|
128
|
+
## 0.1.39/40
|
|
129
|
+
* bug fix: linked rel8ns were only working with past/ancestor (hard-coded).
|
|
130
|
+
* now linkedRel8ns work as expected.
|
|
131
|
+
* added some tests and whatnot.
|
|
132
|
+
|
|
133
|
+
## 0.1.37/38
|
|
134
|
+
* tweak - cleared out src.rel8ns.tjp when forking.
|
|
135
|
+
|
|
136
|
+
## 0.1.35/36
|
|
137
|
+
* Added tjp metadata to really make it more feasible to track ibGib timelines.
|
|
138
|
+
|
|
139
|
+
## 0.1.27
|
|
140
|
+
* No idea...eesh. Quite a bit of version differences since updated this.
|
|
141
|
+
* I'm just trying to get it back up and going.
|
|
142
|
+
* I have it passing tests on node@16 with dreams of isomorphic crypto one day.
|
|
143
|
+
* Have not tested it in a browser plugin to see if crypto is working on
|
|
144
|
+
browser side.
|
|
145
|
+
|
|
146
|
+
## 0.1.9
|
|
147
|
+
* Added factory firstGen functionality for creating first generation ibGibs.
|
|
148
|
+
* The driving use case for this is creating meta ibGibs like for storing settings
|
|
149
|
+
|
|
150
|
+
## 0.1.0
|
|
151
|
+
|
|
152
|
+
ts-gib is back with redone core. So this is basically an initial (re)commit.
|
|
153
|
+
|
|
154
|
+
# notes
|
|
155
|
+
|
|
156
|
+
I'm publishing two versions of this lib at a time. **USUALLY** the odd number is the
|
|
157
|
+
node version (because that is how I run `npm test`), and the higher even number is
|
|
158
|
+
the browser target. But maybe I've switched these up...sigh. Anyway. Alternating
|
|
159
|
+
friggin browser/node targets.
|