unetjs 5.0.1 → 5.1.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/cjs/unet.cjs +63 -2
- package/dist/esm/unet.js +63 -2
- package/dist/unetjs.js +62 -1
- package/dist/unetjs.js.map +1 -1
- package/dist/unetjs.min.js +1 -1
- package/dist/unetjs.min.js.map +1 -1
- package/package.json +17 -16
package/dist/cjs/unet.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* unet.js v5.0
|
|
1
|
+
/* unet.js v5.1.0 2026-03-25T05:10:03.141Z */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/* fjage.js v2.
|
|
5
|
+
/* fjage.js v2.3.0 */
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* An action represented by a message. The performative actions are a subset of the
|
|
@@ -1846,6 +1846,60 @@ const ParameterReq = MessageClass('org.arl.fjage.param.ParameterReq');
|
|
|
1846
1846
|
*/
|
|
1847
1847
|
MessageClass('org.arl.fjage.param.ParameterRsp');
|
|
1848
1848
|
|
|
1849
|
+
/**
|
|
1850
|
+
* Request to write contents to a file, or delete a file.
|
|
1851
|
+
*
|
|
1852
|
+
* @typedef {Message} PutFileReq
|
|
1853
|
+
* @property {string} filename - name of the file to be written to or deleted
|
|
1854
|
+
* @property {number} [content] - content to be written to the file as a byte array. If not provided, the file will be deleted.
|
|
1855
|
+
* @property {number} [offset=0] - offset in the file to write the content to.
|
|
1856
|
+
* @exports PutFileReq
|
|
1857
|
+
*/
|
|
1858
|
+
const PutFileReq = MessageClass('org.arl.fjage.shell.PutFileReq');
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* Request to read a file or a directory.
|
|
1863
|
+
*
|
|
1864
|
+
* If the filename specified represents a directory, then the contents of the
|
|
1865
|
+
* directory (list of files) are returned as a tab separated string with:
|
|
1866
|
+
* filename, file size, last modification time.
|
|
1867
|
+
*
|
|
1868
|
+
* The time is represented as epoch time (milliseconds since 1 Jan 1970).
|
|
1869
|
+
*
|
|
1870
|
+
* @typedef {Message} GetFileReq
|
|
1871
|
+
* @property {string} filename - name of the file or directory to be read
|
|
1872
|
+
* @property {number} [offset=0] - offset in the file to read from (ignored for directories)
|
|
1873
|
+
* @property {number} [length=0] - number of bytes to read from the file (ignored for directories). If 0,
|
|
1874
|
+
* the entire file will be read.
|
|
1875
|
+
* @exports GetFileReq
|
|
1876
|
+
*/
|
|
1877
|
+
const GetFileReq = MessageClass('org.arl.fjage.shell.GetFileReq');
|
|
1878
|
+
|
|
1879
|
+
/**
|
|
1880
|
+
* Response to a {@link GetFileReq}, with the contents of the file or the directory.
|
|
1881
|
+
*
|
|
1882
|
+
* @typedef {Message} GetFileRsp
|
|
1883
|
+
* @property {string} filename - name of the file or directory that was read
|
|
1884
|
+
* @property {number} [content] - content of the file as a byte array. If the filename represents a directory,
|
|
1885
|
+
* the content consists of a list of files (one file per line). Each line starts with the filename
|
|
1886
|
+
* (with a trailing "/" if it is a directory), "\t", file size in bytes, "\t", and last modification date.
|
|
1887
|
+
* @property {number} [offset=0] - offset in the file that the content corresponds to (ignored for directories)
|
|
1888
|
+
* @property {boolean} [directory=false] - indicates if the filename represents a directory
|
|
1889
|
+
* @exports GetFileRsp
|
|
1890
|
+
*/
|
|
1891
|
+
const GetFileRsp = MessageClass('org.arl.fjage.shell.GetFileRsp');
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* Request to execute shell command/script.
|
|
1895
|
+
*
|
|
1896
|
+
* @typedef {Message} ShellExecReq
|
|
1897
|
+
* @property {string} command - shell command or script to be executed
|
|
1898
|
+
* @property {boolean} ans - indicates if the response to this request should include the output of the command/script execution
|
|
1899
|
+
* @exports ShellExecReq
|
|
1900
|
+
*/
|
|
1901
|
+
const ShellExecReq = MessageClass('org.arl.fjage.shell.ShellExecReq');
|
|
1902
|
+
|
|
1849
1903
|
/**
|
|
1850
1904
|
* Services supported by fjage agents.
|
|
1851
1905
|
*/
|
|
@@ -1905,6 +1959,13 @@ let Protocol = {
|
|
|
1905
1959
|
* @typedef {Object.<string, MessageClass>} UnetMessages
|
|
1906
1960
|
*/
|
|
1907
1961
|
let UnetMessages = {
|
|
1962
|
+
|
|
1963
|
+
// fjage
|
|
1964
|
+
'PutFileReq' : PutFileReq,
|
|
1965
|
+
'GetFileReq' : GetFileReq,
|
|
1966
|
+
'GetFileRsp' : GetFileRsp,
|
|
1967
|
+
'ShellExecReq' : ShellExecReq,
|
|
1968
|
+
|
|
1908
1969
|
// unet
|
|
1909
1970
|
'TestReportNtf' : MessageClass('org.arl.unet.TestReportNtf'),
|
|
1910
1971
|
'AbnormalTerminationNtf' : MessageClass('org.arl.unet.AbnormalTerminationNtf'),
|
package/dist/esm/unet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* unet.js v5.0
|
|
1
|
+
/* unet.js v5.1.0 2026-03-25T05:10:03.140Z */
|
|
2
2
|
|
|
3
|
-
/* fjage.js v2.
|
|
3
|
+
/* fjage.js v2.3.0 */
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* An action represented by a message. The performative actions are a subset of the
|
|
@@ -1844,6 +1844,60 @@ const ParameterReq = MessageClass('org.arl.fjage.param.ParameterReq');
|
|
|
1844
1844
|
*/
|
|
1845
1845
|
MessageClass('org.arl.fjage.param.ParameterRsp');
|
|
1846
1846
|
|
|
1847
|
+
/**
|
|
1848
|
+
* Request to write contents to a file, or delete a file.
|
|
1849
|
+
*
|
|
1850
|
+
* @typedef {Message} PutFileReq
|
|
1851
|
+
* @property {string} filename - name of the file to be written to or deleted
|
|
1852
|
+
* @property {number} [content] - content to be written to the file as a byte array. If not provided, the file will be deleted.
|
|
1853
|
+
* @property {number} [offset=0] - offset in the file to write the content to.
|
|
1854
|
+
* @exports PutFileReq
|
|
1855
|
+
*/
|
|
1856
|
+
const PutFileReq = MessageClass('org.arl.fjage.shell.PutFileReq');
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Request to read a file or a directory.
|
|
1861
|
+
*
|
|
1862
|
+
* If the filename specified represents a directory, then the contents of the
|
|
1863
|
+
* directory (list of files) are returned as a tab separated string with:
|
|
1864
|
+
* filename, file size, last modification time.
|
|
1865
|
+
*
|
|
1866
|
+
* The time is represented as epoch time (milliseconds since 1 Jan 1970).
|
|
1867
|
+
*
|
|
1868
|
+
* @typedef {Message} GetFileReq
|
|
1869
|
+
* @property {string} filename - name of the file or directory to be read
|
|
1870
|
+
* @property {number} [offset=0] - offset in the file to read from (ignored for directories)
|
|
1871
|
+
* @property {number} [length=0] - number of bytes to read from the file (ignored for directories). If 0,
|
|
1872
|
+
* the entire file will be read.
|
|
1873
|
+
* @exports GetFileReq
|
|
1874
|
+
*/
|
|
1875
|
+
const GetFileReq = MessageClass('org.arl.fjage.shell.GetFileReq');
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* Response to a {@link GetFileReq}, with the contents of the file or the directory.
|
|
1879
|
+
*
|
|
1880
|
+
* @typedef {Message} GetFileRsp
|
|
1881
|
+
* @property {string} filename - name of the file or directory that was read
|
|
1882
|
+
* @property {number} [content] - content of the file as a byte array. If the filename represents a directory,
|
|
1883
|
+
* the content consists of a list of files (one file per line). Each line starts with the filename
|
|
1884
|
+
* (with a trailing "/" if it is a directory), "\t", file size in bytes, "\t", and last modification date.
|
|
1885
|
+
* @property {number} [offset=0] - offset in the file that the content corresponds to (ignored for directories)
|
|
1886
|
+
* @property {boolean} [directory=false] - indicates if the filename represents a directory
|
|
1887
|
+
* @exports GetFileRsp
|
|
1888
|
+
*/
|
|
1889
|
+
const GetFileRsp = MessageClass('org.arl.fjage.shell.GetFileRsp');
|
|
1890
|
+
|
|
1891
|
+
/**
|
|
1892
|
+
* Request to execute shell command/script.
|
|
1893
|
+
*
|
|
1894
|
+
* @typedef {Message} ShellExecReq
|
|
1895
|
+
* @property {string} command - shell command or script to be executed
|
|
1896
|
+
* @property {boolean} ans - indicates if the response to this request should include the output of the command/script execution
|
|
1897
|
+
* @exports ShellExecReq
|
|
1898
|
+
*/
|
|
1899
|
+
const ShellExecReq = MessageClass('org.arl.fjage.shell.ShellExecReq');
|
|
1900
|
+
|
|
1847
1901
|
/**
|
|
1848
1902
|
* Services supported by fjage agents.
|
|
1849
1903
|
*/
|
|
@@ -1903,6 +1957,13 @@ let Protocol = {
|
|
|
1903
1957
|
* @typedef {Object.<string, MessageClass>} UnetMessages
|
|
1904
1958
|
*/
|
|
1905
1959
|
let UnetMessages = {
|
|
1960
|
+
|
|
1961
|
+
// fjage
|
|
1962
|
+
'PutFileReq' : PutFileReq,
|
|
1963
|
+
'GetFileReq' : GetFileReq,
|
|
1964
|
+
'GetFileRsp' : GetFileRsp,
|
|
1965
|
+
'ShellExecReq' : ShellExecReq,
|
|
1966
|
+
|
|
1906
1967
|
// unet
|
|
1907
1968
|
'TestReportNtf' : MessageClass('org.arl.unet.TestReportNtf'),
|
|
1908
1969
|
'AbnormalTerminationNtf' : MessageClass('org.arl.unet.AbnormalTerminationNtf'),
|
package/dist/unetjs.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.unet = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/* fjage.js v2.
|
|
7
|
+
/* fjage.js v2.3.0 */
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* An action represented by a message. The performative actions are a subset of the
|
|
@@ -1848,6 +1848,60 @@
|
|
|
1848
1848
|
*/
|
|
1849
1849
|
MessageClass('org.arl.fjage.param.ParameterRsp');
|
|
1850
1850
|
|
|
1851
|
+
/**
|
|
1852
|
+
* Request to write contents to a file, or delete a file.
|
|
1853
|
+
*
|
|
1854
|
+
* @typedef {Message} PutFileReq
|
|
1855
|
+
* @property {string} filename - name of the file to be written to or deleted
|
|
1856
|
+
* @property {number} [content] - content to be written to the file as a byte array. If not provided, the file will be deleted.
|
|
1857
|
+
* @property {number} [offset=0] - offset in the file to write the content to.
|
|
1858
|
+
* @exports PutFileReq
|
|
1859
|
+
*/
|
|
1860
|
+
const PutFileReq = MessageClass('org.arl.fjage.shell.PutFileReq');
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* Request to read a file or a directory.
|
|
1865
|
+
*
|
|
1866
|
+
* If the filename specified represents a directory, then the contents of the
|
|
1867
|
+
* directory (list of files) are returned as a tab separated string with:
|
|
1868
|
+
* filename, file size, last modification time.
|
|
1869
|
+
*
|
|
1870
|
+
* The time is represented as epoch time (milliseconds since 1 Jan 1970).
|
|
1871
|
+
*
|
|
1872
|
+
* @typedef {Message} GetFileReq
|
|
1873
|
+
* @property {string} filename - name of the file or directory to be read
|
|
1874
|
+
* @property {number} [offset=0] - offset in the file to read from (ignored for directories)
|
|
1875
|
+
* @property {number} [length=0] - number of bytes to read from the file (ignored for directories). If 0,
|
|
1876
|
+
* the entire file will be read.
|
|
1877
|
+
* @exports GetFileReq
|
|
1878
|
+
*/
|
|
1879
|
+
const GetFileReq = MessageClass('org.arl.fjage.shell.GetFileReq');
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* Response to a {@link GetFileReq}, with the contents of the file or the directory.
|
|
1883
|
+
*
|
|
1884
|
+
* @typedef {Message} GetFileRsp
|
|
1885
|
+
* @property {string} filename - name of the file or directory that was read
|
|
1886
|
+
* @property {number} [content] - content of the file as a byte array. If the filename represents a directory,
|
|
1887
|
+
* the content consists of a list of files (one file per line). Each line starts with the filename
|
|
1888
|
+
* (with a trailing "/" if it is a directory), "\t", file size in bytes, "\t", and last modification date.
|
|
1889
|
+
* @property {number} [offset=0] - offset in the file that the content corresponds to (ignored for directories)
|
|
1890
|
+
* @property {boolean} [directory=false] - indicates if the filename represents a directory
|
|
1891
|
+
* @exports GetFileRsp
|
|
1892
|
+
*/
|
|
1893
|
+
const GetFileRsp = MessageClass('org.arl.fjage.shell.GetFileRsp');
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* Request to execute shell command/script.
|
|
1897
|
+
*
|
|
1898
|
+
* @typedef {Message} ShellExecReq
|
|
1899
|
+
* @property {string} command - shell command or script to be executed
|
|
1900
|
+
* @property {boolean} ans - indicates if the response to this request should include the output of the command/script execution
|
|
1901
|
+
* @exports ShellExecReq
|
|
1902
|
+
*/
|
|
1903
|
+
const ShellExecReq = MessageClass('org.arl.fjage.shell.ShellExecReq');
|
|
1904
|
+
|
|
1851
1905
|
/**
|
|
1852
1906
|
* Services supported by fjage agents.
|
|
1853
1907
|
*/
|
|
@@ -1907,6 +1961,13 @@
|
|
|
1907
1961
|
* @typedef {Object.<string, MessageClass>} UnetMessages
|
|
1908
1962
|
*/
|
|
1909
1963
|
let UnetMessages = {
|
|
1964
|
+
|
|
1965
|
+
// fjage
|
|
1966
|
+
'PutFileReq' : PutFileReq,
|
|
1967
|
+
'GetFileReq' : GetFileReq,
|
|
1968
|
+
'GetFileRsp' : GetFileRsp,
|
|
1969
|
+
'ShellExecReq' : ShellExecReq,
|
|
1970
|
+
|
|
1910
1971
|
// unet
|
|
1911
1972
|
'TestReportNtf' : MessageClass('org.arl.unet.TestReportNtf'),
|
|
1912
1973
|
'AbnormalTerminationNtf' : MessageClass('org.arl.unet.AbnormalTerminationNtf'),
|