Commit Graph
54 Commits
Author SHA1 Message Date
Nariman JelvehandGitHub 560307d587 Remove unused putility features (#2168)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (20.x) (push) Has been cancelled
test / test-backend (22.x) (push) Has been cancelled
test / API tests (node env, api-test) (22.x) (push) Has been cancelled
test / puterjs (node env, vitest) (22.x) (push) Has been cancelled
* Remove smol utility library and update usage

Deleted the smol utility library from putility, removed its documentation, and refactored code in linux.js to use native string methods instead of smol.split. This simplifies the codebase by eliminating a redundant utility.

* Remove `putility.libs.time` and inline time utilities

* Update imports and time constant usage in core modules

Replaced usage of time.SECOND with a local SECOND constant in ServerHealthService for clarity and removed unused import. Updated all service imports in TestCoreModule to explicitly include the .js extension for compatibility with ES module resolution.

* Remove unused `wrap_text` and `ansi_visible_length` functions

Deleted the wrap_text and ansi_visible_length utility functions from string.js, as they are no longer needed or used in the codebase.

* Remove `format_as_usd` utility and related docs

The format_as_usd function and its documentation have been removed from the codebase and README files. This cleans up unused or deprecated currency formatting utilities.

* Remove osclink utility and update references

The osclink function and its documentation have been removed from putility. All usages in backend modules have been updated to use plain URLs instead of OSC 8 hyperlinks. This simplifies string utilities and avoids terminal-specific formatting.

* Remove PosixError utility module

* Remove NariMethodsFeature and related references

Deleted the NariMethodsFeature module and removed its usage from AdvancedBase and PuterJSFileSystemModule. This simplifies the codebase by eliminating unused or deprecated NARI method support.
2025-12-13 17:59:16 -08:00
jelveh 9c5938e2fd Remove comment-writer and AI METADATA comments from backend source files 2025-12-13 00:16:31 -08:00
Daniel SalazarandGitHub 11e057557d fix: eslint autofixable errors (#2002)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / backend (node env, api-test) (22.x) (push) Has been cancelled
test / puterjs (browser env, playwright) (22.x) (push) Has been cancelled
test / puterjs (node env, vitest) (22.x) (push) Has been cancelled
2025-11-21 13:22:19 -08:00
KernelDeimos d398dc90fd chore: putility patch version 1.1.1 2025-10-22 13:32:56 -04:00
KernelDeimos 4a69cd26c2 chore: putility minor version 1.1.0 2025-10-22 13:18:34 -04:00
KernelDeimos ecad29a30e sync: update license headers in putility
The `putility` package had AGPL-3.0 license headers but it should be
under the MIT license because puter.js (the SDK) depends on it.
2025-10-22 13:18:34 -04:00
Eric Dubé c375b30810 Update putility to MIT
Huh, I thought it was already...
2025-10-22 12:18:55 -04:00
KernelDeimos 13a70f5394 devex: update notices and better ANSI handling 2025-10-16 18:00:04 -04:00
KernelDeimos c6dc55d362 devex: add support for 'stars' to notice() 2025-10-16 18:00:04 -04:00
KernelDeimos b53dc01b45 devex: show full time in dev log output 2025-10-16 18:00:04 -04:00
KernelDeimos 70c7aa41ac Reapply "Logs Update" (#1730)
This reverts commit 8f7a68ace6.
2025-10-10 15:01:07 -04:00
Neal ShahandGitHub 8f7a68ace6 Revert "Logs Update" (#1730)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / api-test (22.x) (push) Has been cancelled
* Revert "fix: quick fix for config context issue"

This reverts commit 0c06040e6c.

* Revert "sync: package-lock.json"

This reverts commit 1e1bd0f2ba.

* Revert "devex: misc log cleanup"

This reverts commit a64a786528.

* Revert "devex: minimal first page load logs"

This reverts commit 196e463c59.

* Revert "devex: minimal initialization logs"

This reverts commit ea9c222c09.

* Revert "fix: add missing await in kv example extension"

This reverts commit 9b34e67d0d.

* Revert "devex: reduce logs at init"

This reverts commit fa221149c2.

* Revert "sync: package.json changes"

This reverts commit 4db73d75a5.

* Revert "fix: remove unused AWS SDK v2 import"

This reverts commit 4d8692fd31.

* Revert "devex: hide `npm install` output unless it fails"

This reverts commit fe03a4b598.

* Revert "devex: rollup via module instead of subprocess"

This reverts commit 360082d8bd.

* Revert "devex: webpack via module instead of subprocess"

This reverts commit 1449d12b0e.

* Optional chain logger
2025-10-09 23:08:01 -04:00
Daniel SalazarandGitHub a3c6c0b914 Revert "revert: revert devex changes (#1728)" (#1729)
This reverts commit fc725d0130.
2025-10-09 19:16:20 -07:00
Daniel SalazarandGitHub fc725d0130 revert: revert devex changes (#1728)
* Revert "fix: quick fix for config context issue"

This reverts commit 0c06040e6c.

* Revert "sync: package-lock.json"

This reverts commit 1e1bd0f2ba.

* Revert "devex: misc log cleanup"

This reverts commit a64a786528.

* Revert "devex: minimal first page load logs"

This reverts commit 196e463c59.

* Revert "devex: minimal initialization logs"

This reverts commit ea9c222c09.

* Revert "fix: add missing await in kv example extension"

This reverts commit 9b34e67d0d.

* Revert "devex: reduce logs at init"

This reverts commit fa221149c2.

* Revert "sync: package.json changes"

This reverts commit 4db73d75a5.

* Revert "fix: remove unused AWS SDK v2 import"

This reverts commit 4d8692fd31.

* Revert "devex: hide `npm install` output unless it fails"

This reverts commit fe03a4b598.

* Revert "devex: rollup via module instead of subprocess"

This reverts commit 360082d8bd.

* Revert "devex: webpack via module instead of subprocess"

This reverts commit 1449d12b0e.
2025-10-09 18:43:03 -07:00
KernelDeimos ea9c222c09 devex: minimal initialization logs 2025-10-09 19:39:02 -04:00
Daniel Salazar a936333006 npm: release to npm 2025-09-19 13:58:25 -07:00
986b0f66e8 doc: putility
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* Added reference documentation for: src/putility/src/bases/BasicBase.js

* Added reference documentation for: src/putility/src/libs/context.js

* Added reference documentation for: src/putility/src/libs/log.js

* Added reference documentation for: src/putility/src/concepts/Service.js

* Update src/putility/src/bases/BasicBase.js

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>

* Update src/putility/src/concepts/Service.js

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>

---------

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>
2025-08-18 19:04:44 -04:00
KernelDeimos 502204a7b7 test: update tests, migrate backend to vitest
Backend had tests written in mocha as well as a test written for jest
(created by an AI utility, wasn't compatible with mocha tests). The AI
generated test had merit so it was migrated to vitest along with all the
mocha tests, which supports conventions from both frameworks.

Vitest also has an excellent watcher cli.

The root repo package.json now runs unit tests in backend. Before it was
only running tests defined in the _test method of backend services.
2025-07-04 18:21:45 -04:00
KernelDeimos c2c5d88336 fix: update package.json 2025-02-11 12:29:01 -05:00
KernelDeimos fa4b38cd02 fix: oops, no export (putility.libs.event) 2025-02-11 11:23:55 -05:00
KernelDeimos e49af481ba dev: make it easier to use putility emitter 2025-02-11 11:10:02 -05:00
KernelDeimos a803d55cfb fix: broken test in putility 2025-02-11 10:54:03 -05:00
jelveh 4e578e9b28 update copyright date
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
2025-01-19 22:27:31 -08:00
jelveh 6a184d52b4 Update copyright notice dates in license headers 2025-01-06 15:18:22 -08:00
KernelDeimos 15898fe5b7 chore: update license headers
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
2025-01-06 11:55:17 -05:00
KernelDeimos 4b3f71b25e dev: migrate listenerutil, remove duplicate 2024-12-13 10:20:31 -05:00
KernelDeimos 82457fbc9f doc: document smol (SmolUtil) lib 2024-12-05 16:16:44 -05:00
KernelDeimos 7de23ce68d move: SmolUtil and ServerHealthService 2024-12-05 16:16:44 -05:00
KernelDeimos 86a9c959e0 doc: document commonly-used putility libraries 2024-12-05 14:36:34 -05:00
KernelDeimos 58dea19cd9 move strutil and time.js to putility 2024-12-05 14:00:21 -05:00
KernelDeimos 5caa2c0e3a fix: logging in AppConnection 2024-11-07 14:26:30 -05:00
KernelDeimos ba2eb716f5 dev: add prefix logger 2024-11-05 15:57:55 -05:00
KernelDeimos e71fe11e32 dev: add toggle logging, and fix issues in logger 2024-11-05 15:31:17 -05:00
KernelDeimos b0cbcdf743 dev: add logger to putility 2024-11-05 15:03:21 -05:00
KernelDeimos 84989367a7 dev: hook extensions into service event bus 2024-11-01 17:42:12 -04:00
KernelDeimos 14d45a27ed feat: add extension API for modules
Allows modules to register a listener to the 'install' event without
creating a Module class. This changes how external modules are
installed.

External modules are now referred to as "extensions"; this commit does
not update the term but does use 'extension' as the name of the global.
2024-10-31 18:08:27 -04:00
KernelDeimos 0fb4f73d76 chore: remove noisy logs 2024-10-19 17:31:46 -04:00
KernelDeimos 480d996279 dev: proof-of-concept for fs postMessage relay
Adds a filesystem relay service to GUI-side which currently reports an
exmaple fsentry for /stat and /readdir. Added filesystem services for
both sides. Moved filesystem implementations from src/modules to src/lib
since they're being called by services now rather than modules.

This functionality is effectively disabled unless
src/puter-js/src/services/Filesystem.js is updated to use init_app_fs_()
when the environment is 'app'.
2024-10-19 03:46:47 -04:00
KernelDeimos 6e5d5c2021 dev: clone property descriptors in Context 2024-10-19 03:45:41 -04:00
KernelDeimos bc5d09fe31 dev: hooks and sequencing functions for ServiceManager 2024-10-18 23:10:19 -04:00
KernelDeimos 94e15dbfa8 test: fix topics test and ServiceManager 2024-10-18 19:13:06 -04:00
KernelDeimos 3c5d2af8c8 fix: small issue in Service.js 2024-10-18 15:53:40 -04:00
KernelDeimos 7922314840 dev: add generic pub/sub system for use anywhere
Dispatching and listening to events is non-trivial. The apparent
triviality is in implementing a list of listeners and calling them. The
non-triviality is in the nature of what happens to a system when it has
multiple different interfaces to register listeners and publish events.

This commit adds TopicsFeature, which allows any class extending
AdvancedBase to declare topics. A topic is a simple pub/sub channel.
TopicsFeature will manage the state of listeners so the class doesn't
need to. A GC-friendly mechanism for detaching listeners is also provided.
2024-10-17 22:56:00 -04:00
KernelDeimos 9b1f1817f5 dev: move service interface to trait 2024-10-17 22:56:00 -04:00
KernelDeimos 273a51fc53 dev: add ServiceManager
The ServiceManager will replace manual management of services within
initgui, and will also be used within puter.js. Eventually Puter's
backend might use this instead of the existing Container class, although
this will be a large change that needs to be done incrementally.

The difference between ServiceManager and Container is the logic behind
when initialization occurs. Rather than have all services initialized at
once when Container's init() method is called, services are initialized
as soon as their dependencies have been initialized.
2024-10-17 22:56:00 -04:00
KernelDeimos fd7bd339ca dev: add Context to putility 2024-10-15 16:17:37 -04:00
KernelDeimos 9e88096e7e clean: remove a console.log 2024-10-14 15:19:52 -04:00
KernelDeimos fc9a371e09 dev: add more to NariMethodsFeature 2024-10-11 18:39:58 -04:00
KernelDeimos 43c5402b7c feat(putility): trait method override support
Support for trait method overrides will make it possible to use putility
traits with the decorator pattern while using a proxy class to avoid
redundant re-implementation of proxy methods.

Use of the pattern described above will occur in the implementation of
client-side filesystem caching.
2024-10-11 18:39:58 -04:00
KernelDeimos c12ae2a923 dev: prepare puter.js fs for decorator pattern
- de-coupled xhr callback passing from the interface of the underlying
  filesystem implementation.
- This makes the interface to delegate calls more suitable for use with
  the decorator pattern.
- The decorator pattern will be used to manage the complexity of the
  caching layer by separating the concerns of different caching methods.
2024-10-11 18:39:58 -04:00