Add capacitorjs runtime

This commit is contained in:
olcxja 2026-05-03 17:09:55 +02:00
commit f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions

64
node_modules/mergexml/test/all.conf.js generated vendored Normal file
View file

@ -0,0 +1,64 @@
// Karma configuration
// Generated on Thu Jul 02 2015 10:24:08 GMT-0600 (MDT)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '..',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai'],
// list of files / patterns to load in the browser
files: [
'mergexml.js',
'test/spec/*.spec.js'
],
// list of files to exclude
exclude: [],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Firefox', 'Chrome', 'ChromeCanary', 'Safari', 'Opera'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};

179
node_modules/mergexml/test/spec/merge.spec.js generated vendored Normal file
View file

@ -0,0 +1,179 @@
/* jshint node:true */
/* global MergeXML, describe, it, before, after, beforeEach, afterEach, expect */
'use strict';
describe('Instantiating object ', function() {
var merger;
it('works', function() {
merger = new MergeXML();
expect(merger).to.be.an('object');
});
});
describe('Adding source', function() {
var merger, a, b;
it('strings works', function() {
merger = new MergeXML();
a = '<a/>';
b = '<b/>';
expect(merger.AddSource(a)).to.not.equal(false);
expect(merger.AddSource(b)).to.not.equal(false);
});
});
describe('Merging XML sources', function() {
var merger, a, b;
describe('with option join = undefined', function() {
// TODO
});
describe('with option join = false', function() {
it('succeeds if sources have a common root name', function() {
merger = new MergeXML({
join: false
});
a = '<r><a/></r>';
b = '<r><b/></r>';
merger.AddSource(a);
merger.AddSource(b);
expect(merger.Get(1).trim()).to.equal('<r><a/><b/></r>');
});
it('fails to merge second source if sources do not have a common root name', function() {
merger = new MergeXML({
join: false
});
a = '<a/>';
b = '<b/>';
merger.AddSource(a);
merger.AddSource(b);
expect(merger.Get(1).trim()).to.equal('<a/>');
});
});
describe('with option updn = true or undefined', function() {
var merger, a, b;
it('merges sources by nodeName', function() {
merger = new MergeXML({
updn: true
});
a = '<a>' +
'<c>s1</c>' +
'<c>s3</c>' +
'</a>';
b = '<a>' +
'<c>s1</c>' +
'<b>s2</b>' +
'<c>s4</c>' +
'</a>';
merger.AddSource(a);
merger.AddSource(b);
expect(merger.Get(1).trim()).to.equal('<a><c>s1</c><c>s4</c><b>s2</b></a>');
merger = new MergeXML();
merger.AddSource(a);
merger.AddSource(b);
expect(merger.Get(1).trim()).to.equal('<a><c>s1</c><c>s4</c><b>s2</b></a>');
});
});
describe('with option updn = false', function() {
var merger, a, b;
it('merges sources by node position, discarding nodeName', function() {
merger = new MergeXML({
updn: false
});
a = '<a>' +
'<c>s1</c>' +
'<c>s3</c>' +
'</a>';
b = '<a>' +
'<c>s1</c>' +
'<b>s2</b>' +
'<c>s4</c>' +
'</a>';
merger.AddSource(a);
merger.AddSource(b);
expect(merger.Get(1).trim()).to.equal('<a><c>s1</c><c>s2</c><c>s4</c></a>');
});
});
describe('with namespaced attributes', function() {
var merger;
var ns = 'https://github.com/enketo/merge-xml';
it('correctly adds namespaced attributes from second source', function() {
merger = new MergeXML({
join: false
});
a = '<a>' +
'<c>s1</c>' +
'</a>';
b = '<a xmlns:enk="' + ns + '">' +
'<c enk:custom="something">s2</c>' +
'</a>';
merger.AddSource(a);
merger.AddSource(b);
expect(merger.error.code).to.equal('');
expect(merger.error.text).to.equal('');
expect(merger.Get(1).trim()).to.equal('<a xmlns:enk="' + ns + '"><c enk:custom="something">s2</c></a>');
// in IE11 and below, merger.Get(0) returns an ActiveXObject we use the internal "Query" function
expect(merger.Query('//c').attributes[0].localName).to.equal('custom'); // fails in IE because
expect(merger.Query('//c').attributes[0].namespaceURI).to.equal(ns);
})
})
describe('with sources that have and do not have a UTF encoding declaration', function() {
var merger;
var a = '<?xml version="1.0"?>' +
'<a><c>s1</c></a>';
var b = '<?xml version="1.0" encoding="UTF-8"?>' +
'<a><c>s2</c></a>';
it('undeclared and UTF-8', function() {
merger = new MergeXML({
join: false
});
merger.AddSource(a);
merger.AddSource(b);
expect(merger.error.code).to.equal('');
expect(merger.error.text).to.equal('');
expect(merger.Get(1)).to.contain('<a><c>s2</c></a>');
});
it('UTF8 and undeclared', function() {
merger = new MergeXML({
join: false
});
merger.AddSource(b);
merger.AddSource(a);
expect(merger.error.code).to.equal('');
expect(merger.error.text).to.equal('');
expect(merger.Get(1)).to.contain('<a><c>s1</c></a>');
});
});
});

33
node_modules/mergexml/test/test1.xml generated vendored Normal file
View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
sample configuration
@package System
@author Vallo Reima
@copyright (C)2012
-->
<cfg xmlns="http://www.vallo.me/">
<!-- Application properties -->
<apn>
<name>vRegistrator</name>
<vers>1.1</vers>
</apn>
<!-- Modules -->
<mod>
<ath flag="O">auth</ath>
<sni flag="C">login</sni>
<snu>signup</snu>
</mod>
<!-- Loader modules -->
<ldm>
<sni>
<P opt="wrap">login</P>
<J opt="load" stay="all">login</J>
<S>login</S>
</sni>
<snu>
<P opt="wrap">signup</P>
<S>signup</S>
<J opt="load">signup</J>
</snu>
</ldm>
</cfg>

30
node_modules/mergexml/test/test2.xml generated vendored Normal file
View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
sample configuration
@package Application
@author Vallo Reima
@copyright (C)2013
-->
<cfg xmlns="http://www.vallo.me/" xmlns:rgn="http://www.vregistry.com/">
<!-- Application properties -->
<rgn:apn>
<name>vRegistry</name>
<vers>1.0</vers>
</rgn:apn>
<!-- Modules -->
<mod>
<sni flag="C">signin</sni>
</mod>
<!-- Loader modified-->
<ldm>
<sni>
<P opt="wrapper">signin</P>
<S>login</S>
<S>signin</S>
<J opt="loader">login</J>
</sni>
</ldm>
</cfg>
<!--
merged with system
-->